Commit Graph

7418 Commits

Author SHA1 Message Date
Maxim Cournoyer
a87d722570
git: Fix typo in reference-available? comment.
* guix/git.scm (reference-available?): Fix typo.
2023-09-05 23:04:26 -04:00
Maxim Cournoyer
c3d48d024b
time-machine: Also validate the reference from a channels file.
* guix/scripts/time-machine.scm (guix-time-machine)
<validate-guix-channel>: Update doc.  Fall-back to use the Guix channel
reference when REF is #f.

Reported-by: Simon Tournier <zimon.toutoune@gmail.com>
Co-authored-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-09-05 19:52:20 -04:00
Maxim Cournoyer
756e336fa0
Revert "guix: git: Avoid touching the network unless needed in 'reference-available?'."
This reverts commit a789dd5865, which broke
e.g.:

  guix time-machine -C <(echo %default-channels) -- describe

Add an explanatory comment as suggested.

Reported-by: Ludovic Courtès <ludo@gnu.org>
2023-09-05 19:52:20 -04:00
Maxim Cournoyer
fd09e7b053
gnu-maintenance: Do not crash on refresh when origin URI is a list.
Updating the simh package would fail with:

  ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure
  string-prefix?: Wrong type argument in position 2 (expecting
  string): ("http://simh.trailing-edge.com/sources/simhv312-4.zip"
  "http://simh.trailing-edge.com/sources/archive/simhv312-4.zip")

This is because it expects a scalar value, but lists are allowed for URIs.

* guix/gnu-maintenance.scm (import-html-updatable-release): Check that URI is
a string before checking if it has the mirror:// prefix.
2023-09-05 19:52:19 -04:00
Liliana Marie Prikler
9d074e16c7
Merge branch 'master' into emacs-team 2023-08-26 07:08:03 +02:00
Josselin Poiret
106ad23ae4
graph: Add GraphML backend.
* guix/graph.scm (emit-graphml-prologue, emit-graphml-epilogue,
emit-graphml-node, emit-graphml-edge): New procedures.
(%graphml-backend): New variable.
(%graph-backends): Add %graphml-backend.
2023-08-25 14:24:43 +02:00
Josselin Poiret
d57cab7641
image: Add mbr-raw-image-type and use by default.
* gnu/system/image.scm (mbr-disk-image, mbr-raw-image-type): New variables.
(qcow2-image-type): Inherit mbr-disk-image.
* guix/scripts/system.scm (%default-options): Use mbr-raw-image-type by
default.
* gnu/tests/install.scm (run-install): Use mbr-raw in the tests.
* doc/guix-cookbook.texi (Guix System Image API): Update the list of image
types.
* doc/guix.texi (Invoking guix system, System Images, image-type Reference):
Add mbr-raw and switch documented default to it.
2023-08-25 14:24:21 +02:00
Nicolas Goaziou
738b0e4ccc
guix: profiles: Detect TeX Live packages propagated from non-TeX Live inputs.
This fixes <https://issues.guix.gnu.org/65474>.

* guix/profiles.scm (texlive-font-maps): Also check for TeX Live dependencies
in non "texlive-" prefixed packages.

For example, PYTHON-NBCONVERT propagates TeX Live inputs.  Those need to be
found out when building ".map"" files.

Co-authored-by: Andreas Enge <andreas@enge.fr>
2023-08-24 16:03:18 +02:00
Ludovic Courtès
f4d0d0bd5e
Revert "self: Build gnu/packages/*.go in 26 steps."
This reverts commit 5898b2e8a3, which led
to Guix where many .go files would be missing, as reported in
<https://issues.guix.gnu.org/65456>.
2023-08-22 23:50:53 +02:00
Janneke Nieuwenhuizen
5898b2e8a3
self: Build gnu/packages/*.go in 26 steps.
Similar to the Makefile.am change, this breaks-up gnu/packages into 26 chunks
when building on 32bit.  Also force garbage collection.

* guix/self.scm (compiled-modules)[process-directory]: Split building of
"gnu/packages" into 26 chunks.
2023-08-22 21:21:34 +02:00
Maxim Cournoyer
c655231b72
gnu-maintenance: Improve check for disabled host names.
Found while investigating <https://issues.guix.gnu.org/65304>.

* guix/gnu-maintenance.scm (html-updatable-package?): Tighten predicate.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-08-22 12:38:50 -04:00
Maxim Cournoyer
91c8bd01f8
download: Add mirrors for Qt.
* guix/download.scm (%mirrors): Augment with qt mirrors.

Series-changes: 2
- Move authoritative mirror last, as it's too slow.
2023-08-22 12:32:19 -04:00
Attila Lendvai
e318b62df3
ssh: Also print the user when authentication fails.
* guix/ssh.scm (open-ssh-session): Show user in error message.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-08-22 11:17:53 +02:00
Liliana Marie Prikler
50b2db40ea
guix: emacs-utils: Add ert-number-tests.
* guix/build/utils.scm (ert-number-tests): New variable.
2023-08-19 01:37:20 +02:00
Nicolas Graves
9be28375cf
reconfigure: Use let* from srfi-71.
* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services): Merge
'let' + 'let*' in just 'let*'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-12 23:07:40 +02:00
fanquake
bcdafd00a3
platform: Add powerpc64-linux.
* guix/platforms/powerpc.scm (powerpc64-linux): New variable.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-08-12 23:02:31 +02:00
Ricardo Wurmus
b6441f7bd0
upstream: Compare symbols to symbols.
The UNCHANGED? comparison would always yield #FALSE, because we have been
comparing lists of strings with lists of symbols.

* guix/upstream.scm (update-package-inputs): Convert string labels to symbols
before comparison.
2023-09-13 22:17:21 +02:00
Maxim Cournoyer
f0e05411bd
search-paths: Add $TZDIR.
* guix/search-paths.scm ($TZDIR): New search path.
2023-09-12 10:03:44 -04:00
Maxim Cournoyer
2a7f031ca9
gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs.
This reinstate commit a5b5df7f7f with a fix to
the inner expand-uri procedure.
2023-09-11 23:39:13 -04:00
Maxim Cournoyer
a9d5d1d9dd
Revert "gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs."
This reverts commit a5b5df7f7f.  Pushed too
early.
2023-09-11 23:30:43 -04:00
Maxim Cournoyer
a5b5df7f7f
gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs.
Fixes <https://issues.guix.gnu.org/58697>.

* guix/gnu-maintenance.scm (import-html-updatable-release): Update doc.
<expand-uri>: New nested procedure.  Apply it to the origin URI.

Reported-by: kiasoc5 <kiasoc5@disroot.org>
2023-09-11 22:53:38 -04:00
宋文武
597af70fd2
Merge branch 'kde-updates' 2023-08-19 05:02:00 +08:00
Ludovic Courtès
9c8098424b
pull, time-machine: Add '-q' to ignore channel files.
This also fixes <https://issues.guix.gnu.org/63726>.

* guix/scripts/pull.scm (show-help, %options): Add '-q'.
(channel-list): Honor it.
* guix/scripts/time-machine.scm (show-help, %options): Add '-q'.
* doc/guix.texi (Invoking guix pull, Invoking guix time-machine):
Document it.

Reported-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-08-17 17:33:53 +02:00
Ludovic Courtès
3363ff1867
ui: 'load*' accepts /dev/fd/N files pointing to a pipe.
This allows users to write Bash commands like:

  guix time-machine -C <(echo %default-channels) -- ...

or:

  guix build -m <(echo '(specifications->manifest (list "guile"))')

Previously, on GNU/Linux, they would fail with:

  error: failed to load '/dev/fd/63': No such file or directory

* guix/ui.scm (try-canonicalize-path): New procedure.
(load*): Use it.
* tests/guix-build.sh: Test 'guix build -m' with a /dev/fd/N file.
2023-08-17 17:33:53 +02:00
宋文武
0ffbdf3456
Merge remote-tracking branch 'origin/master' into kde-updates 2023-08-17 18:38:23 +08:00
Maxim Cournoyer
79ec651a28
scripts: time-machine: Error when attempting to visit too old commits.
* doc/guix.texi (Invoking guix time-machine): Document limitation.
* guix/inferior.scm (cached-channel-instance): New VALIDATE-CHANNELS
argument.  Use it to validate channels when there are no cache hit.
* guix/scripts/time-machine.scm
(%options): Tag the given reference with 'tag-or-commit instead of 'commit.
(%oldest-possible-commit): New variable.
(guix-time-machine) <validate-guix-channel>: New nested procedure.  Pass it to
the 'cached-channel-instance' call.
* tests/guix-time-machine.sh: New test.
* Makefile.am (SH_TESTS): Register it.

Suggested-by: Simon Tournier <zimon.toutoune@gmail.com>
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Reviewed-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-08-16 21:34:13 -04:00
Maxim Cournoyer
ecab937897
pull: Tag commit argument with 'tag-or-commit.
For compatibility with (guix git) procedures.

* guix/scripts/pull.scm (channel-list): Also accept tag-or-commit tagged
refspec.
2023-08-16 21:34:13 -04:00
Maxim Cournoyer
addffd0988
git: Clarify commit relation reference in doc.
* guix/git.scm (update-cached-checkout): Clarify that it is the relation of
STARTING-COMMIT that is returned, relative to the new commit, not the other
way around.
2023-08-16 21:34:13 -04:00
Ludovic Courtès
bb7369ba8a
guix home: Create /tmp in container if needed.
Previously 'guix home container' would create a container without /tmp,
which would prevent 'least-authority-wrapper' programs from starting,
for example.

* guix/scripts/home.scm (spawn-home-container): Create /tmp if it
doesn't exist yet.
2023-08-16 22:09:38 +02:00
Nicolas Goaziou
1804a99d05
guix: import: texlive importer handles Ruby linked scripts.
* guix/import/texlive.scm (linked-scripts): Also check for scripts with ".rb" extension.
(tlpdb->package): Add proper RUBY input for Ruby linked scripts.
2023-08-16 11:47:09 +02:00
Maxim Cournoyer
2884abb3df
refresh: Add --target-version option.
* guix/scripts/refresh.scm (%options): Register 'target-version' long version.
(update-specification->update-spec): Add a fallback-version argument.
(options->update-specs): Honor target-version option.
* tests/guix-refresh.sh: Test it.
* doc/guix.texi (Invoking guix refresh): Document it.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-08-15 09:38:29 -04:00
Nicolas Goaziou
1619f2c18c
guix: import: Do not prefix `fsf-free' with "license:" in texlive.
* guix/import/texlive.scm (tlpdb->package): For consistency with other
imported licenses, `fsf-free' need not be prefixed with "license:".
2023-08-14 13:44:06 +02:00
Nicolas Goaziou
6f03e4be85
guix: import: Handle X11 license in texlive importer.
* guix/import/texlive.scm (string->license): Recognize X11 license.
2023-08-14 13:42:52 +02:00
宋文武
770f3f587d
Merge remote-tracking branch 'origin/master' into kde-updates 2023-08-11 20:19:52 +08:00
Zheng Junjie
3e5192e6bb
build: qt-utils: Wrap QML2_IMPORT_PATH with 'prefix' location.
Some qml files have optional or circular dependencies, use 'prefix' instead of
'=' to get those dependencies from environment/profile.

* guix/build/qt-utils.scm (variables-for-wrapping): Use 'prefix' for
QML2_IMPORT_PATH.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-08-02 22:27:43 +08:00
walky_talky
3f092e4d76
licenses: Add Arphic-1999 (Aprhic Public License).
* guix/licenses.scm (arphic-1999): New variable.
* guix/import/utils.scm (%spdx-license-identifiers): Add Arphic-1999.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-08-01 19:40:19 +08:00
Simon Tournier
5025a68c71
scripts: pull: Teach 'channels-list' to use 'tag' git references.
* guix/scripts/pull.scm (channel-list): Add support for 'tag' references, to
honor the various possible references types as defined in the documentation of
the update-cached-checkout procedure.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-08-29 15:24:49 -04:00
Simon Tournier
a789dd5865
guix: git: Avoid touching the network unless needed in 'reference-available?'.
* guix/git/scm (reference-available?): Use the resolve-reference procedure
to determine whether the reference exists in the local Git checkout.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-08-29 15:23:58 -04:00
Ricardo Wurmus
c8a642de9a
import-utils: Do not include punctuation when wrapping in @code{}.
* guix/import/utils.scm (beautify-description): Exclude punctuation.
* tests/import-utils.scm: Add new test.
2023-08-28 19:08:38 +02:00
Maxim Cournoyer
1dce887776
gnu-maintenance: Consider Qt source tarballs as "release files".
* guix/gnu-maintenance.scm (release-file?): Use positive logic in doc.
Add a special case for Qt source archives.
* tests/gnu-maintenance.scm ("release-file?"): Update test.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer
bdaef69556
gnu-maintenance: Allow mirror URLs to fallback to the generic HTML updater.
* guix/gnu-maintenance.scm (http-url?): Extract from html-updatable-package?,
modify to return the HTTP URL, and support the mirror:// scheme.
(%disallowed-hosting-sites): New variable, extracted from
html-updatable-package.
(html-updatable-package?): Rewrite a mirror:// URL to an HTTP or HTTPS one.
* guix/download.scm (%mirrors): Update comment.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer
6953fb9241
gnu-maintenance: Add support to rewrite version in URL path.
Fixes <https://issues.guix.gnu.org/64015>.
Fixes <https://issues.guix.gnu.org/65304>.

Previously, the generic HTML updater would only look for the list of files
found at the parent of its current source URL, ignoring that the URL may embed
the version elsewhere in its path.  This could cause 'guix refresh' to report
no updates available, while in fact there were, such as for 'libuv'.

* guix/gnu-maintenance.scm (strip-trailing-slash): New procedure.
(%version-rx): New variable.
(rewrite-url): New procedure.
(import-html-release): New rewrite-url? argument.  When true, use the above
procedure.
(import-html-updatable-release): Call import-html-release with #:rewrite-url
set to #t.
* tests/gnu-maintenance.scm ("rewrite-url, to-version specified")
("rewrite-url, without to-version"): New tests.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer
6fb8cc312d
gnu-maintenance: Extract 'canonicalize-url' from 'import-html-release'.
* guix/gnu-maintenance.scm
(canonicalize-url): New procedure, extracted from...
(import-html-release): ... here.  Use it.  Rename inner PACKAGE variable to
NAME, to explicit it is a string and not a package object.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer
2654232660
gnu-maintenance: Document nested procedures in 'import-html-release'.
* guix/gnu-maintenance.scm (import-html-release): Add docstring to the
'file->signature/guess' and 'url->release' nested procedures.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer
c6b5eeac92
gnu-maintenance: Accept package object in 'import-html-release' procedure.
This is in preparation for a new URL rewriting feature, which will need to
have the current version information available.

* guix/gnu-maintenance.scm (import-html-release): Update doc.  Adjust default
value of the DIRECTORY argument.  Bind PACKAGE in lexical scope so that its
value there is unchanged.
(import-savannah-release, import-kernel.org-release)
(import-html-updatable-release): Adjust accordingly.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer
a5e67dec2a
gnu-maintenance: Fix indentation.
* guix/gnu-maintenance.scm: Re-indent file.
2023-08-26 11:38:55 -04:00
Maxim Cournoyer
f6cfc993ac
gnu-maintenance: Extract url->links procedure.
* guix/gnu-maintenance.scm (url->links): New procedure.
(import-html-release): Use it.
2023-08-26 11:38:55 -04:00
Maxim Cournoyer
610d0e30e0
gnu-maintenance: Fix docstring.
* guix/gnu-maintenance.scm (import-kernel.org-release): Fix docstring.
2023-08-26 11:38:55 -04:00
Maxim Cournoyer
4110cc4f75
gnu-maintenance: Make base-url argument of import-html-release required.
It doesn't make sense to have it default to something like
"https://kernel.org/pub"; it should always be provided explicitly.

* guix/gnu-maintenance.scm (import-html-release) <#:base-url>: Turn keyword
argument into a positional argument.  Update doc.
* guix/gnu-maintenance.scm (import-savannah-release): Adjust call accordingly.
(import-kernel.org-release): Likewise.
(import-html-updatable-release): Likewise.
2023-08-26 11:38:55 -04:00
Nicolas Goaziou
3481a5cb37
guix: profiles: Do not raise error on incomplete TeX Live setups.
* guix/profiles.scm (texlive-font-maps): Check if TEXLIVE-SCRIPTS is present
in the manifest before trying to generate font maps.
2023-08-09 18:27:10 +02:00
Ludovic Courtès
5652c2e147
system: Do not check initrd modules for pseudo file systems.
Reported by hako on #guix.

* gnu/machine/ssh.scm (machine-check-initrd-modules): Filter out pseudo
file systems from 'file-systems'.
* guix/scripts/system.scm (check-initrd-modules): Likewise.
2023-08-08 18:01:54 +02:00
Nicolas Goaziou
c173819c8e
guix: profiles: Fix auto-generated file deletion.
* guix/profiles.scm (texlive-font-maps): Make sure auto-generated file exists
before deleting it, which is not guaranteed when creating the initial texmf
tree union.

This is a followup to e43cbeafd1.
2023-07-30 10:57:41 +02:00
Nicolas Goaziou
e43cbeafd1
guix: profiles: Delete generated files.
* guix/profiles.scm (texlive-font-maps): Delete generated files.

Fixes <https://issues.guix.gnu.org/64906>.
2023-07-29 01:09:40 +02:00
Christopher Baines
3bb3fddb5c
download-nar: Improve output.
Report errors that occur, output the "Downloading from " line before starting
to report progress and end the output with a newline.
2023-07-28 18:08:17 +01:00
Hilton Chain
8874f2da2c
scripts: system: Remove duplicated "--target=TRIPLET" in help messages.
It's already included in (show-cross-build-options-help).

* guix/scripts/system.scm (show-help): Remove "--target=TRIPLET".

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-07-28 21:52:18 +08:00
Efraim Flashner
1fd4f544b3
transformations: Wrap go binary.
* guix/transformations.scm (tuning-compiler): Adjust to wrap the go
binary with the appropriate environment variable.
(build-system-with-tuning-compiler): Remove custom 'set-microarchitecture
phase.
2023-07-25 16:07:02 +03:00
Ricardo Wurmus
b9bd1bcce9
import/utils: beautify-description: Wrap class names in @code{...}.
* guix/import/utils.scm (beautify-description): Add procedure to wrap words in
@code{...} markup.
* tests/import-utils.scm: Add two tests.
2023-07-19 15:53:28 +02:00
Ricardo Wurmus
45bf1a9a6b
import/utils: Add more initial words to beautify-description.
* guix/import/utils.scm (beautify-description): Add "Classes" and "Tools" to
initial words to be prefixed with "This package provides".
2023-07-19 15:29:22 +02:00
Maxim Cournoyer
d5f8b50365
pack: Move common build code to (guix build pack).
The rationale is to reduce the number of derivations built per pack to ideally
one, to minimize storage requirements.  The number of derivations had gone up
with 68380db4 ("pack: Extract populate-profile-root from
self-contained-tarball/builder.") as a side effect to improving code reuse.

* guix/scripts/pack.scm (guix): Add commentary comment.
(populate-profile-root, self-contained-tarball/builder): Extract to...
* guix/build/pack.scm (populate-profile-root): ... this, and...
(build-self-contained-tarball): ... that, adjusting for use on the build side.
(assert-utf8-locale): New procedure.
(self-contained-tarball, debian-archive, rpm-archive): Adjust accordingly.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-07-18 16:56:06 -04:00
Nicolas Goaziou
f832746ab6
guix: Fix license translation in texlive importer.
* guix/import/texlive.scm (string->license): Properly translate "artistic2"
into `artistic2.0'.
2023-07-18 18:19:02 +02:00
Nicolas Goaziou
1dc7971429
guix: texlive importer handles scripts with ".texlua" extension.
* guix/import/texlive.scm (linked-scripts): Also offer to link scripts with
a ".texlua" extension.
2023-07-18 18:18:24 +02:00
Nicolas Goaziou
985cf777b9
guix: texlive import ignores TeXworks.
* guix/import/texlive.scm (translate-depends): Ignore TeXworks files from TeX
Live, since they are Windows-only.
2023-07-18 18:18:24 +02:00
Nicolas Goaziou
b5d9ae22f5
guix: texlive importer ignores Asymptote package.
Asymptote is provided in `asymptote' Guix package.  OTOH, asy executable is
not built from TeX Live tree.  Therefore, Asymptote package from TeX Live can be ignored.

* guix/import/texlive.scm (translate-depends): Ignore Asymptote package.
2023-07-18 18:18:24 +02:00
Nicolas Goaziou
e7274a98d5
guix: licenses: Add Academic Free License 2.1.
* guix/licenses.scm (afl2.1): New variable.
2023-07-18 18:18:23 +02:00
Nicolas Goaziou
75677daa83
guix: import: texlive importer handles more licenses.
* guix/import/texlive.scm (string->license): Handle CC0 and ISC licenses.
2023-07-18 18:16:55 +02:00
Christopher Baines
c1f7156d55
svn-download: Handle the single file case when downloading a nar.
Delete the output so that download-nar doesn't error when trying to restore.

* guix/svn-download.scm (svn-multi-fetch): Delete the output if it exists
prior to calling download-nar.
2023-07-18 18:16:55 +02:00
Christopher Baines
32e48b8b43
svn-download: Use download-nar in svn-multi-fetch.
This should help if there are issues fetching from the source repository.

* guix/svn-download.scm (svn-multi-fetch): Use download-nar and adjust
accordingly.
2023-07-18 18:16:54 +02:00
Christopher Baines
a8d937d1bb
svn-download: Use download-nar.
This should help if there are issues fetching from the source repository.

* guix/svn-download.scm (svn-fetch): Use download-nar and adjust accordingly.
2023-07-18 18:16:54 +02:00
Nicolas Goaziou
026ed35ddb
guix: import: Handle texlua and TCL scripts.
* guix/import/texlive.scm (linked-scripts): Also generate scripts from files
with ".tlu" and ".tcl" extensions.
(tlpdb->package): Add appropriate inputs when providing a TCL script.
2023-07-18 18:16:53 +02:00
Nicolas Goaziou
29cc6b1cd6
gnu: Deprecate `texlive-tiny'.
At this point, there are three equivalent TeX Live sub-systems:
texlive-scheme-basic, texlive-tiny, and (texlive-updmap.cfg).  It is confusing
to keep so many around.

* doc/contributing.texi (Submitting Patches): Remove reference to
TEXLIVE-TINY.
* gnu/packages/algebra.scm (pari-gp)[native-inputs]:
(giac)[native-inputs]:
* gnu/packages/chez.scm (chez-sockets)[native-inputs]:
* gnu/packages/engineering.scm (fastcap)[native-inputs]:
* gnu/packages/gettext.scm (po4a)[native-inputs]:
* gnu/packages/maths.scm (cddlib)[native-inputs]:
(gnuplot)[native-inputs]:
(itpp)[native-inputs]:
* gnu/packages/ocaml.scm (unison)[native-inputs]:
* gnu/packages/pdf.scm (extractpdfmark)[native-inputs]:
* gnu/packages/photo.scm (enblend-enfuse): Replace TEXLIVE-TINY with a call to TEXLIVE-UPDMAP.CFG.
* gnu/packages/radio.scm (gnuradio)[native-inputs]: Remove unnecessary
TEXLIVE-TINY.
* gnu/packages/tex.scm (texlive-tiny): Deprecate it in favor of TEXLIVE-SCHEME-BASIC.
(texlive-makecmds)[native-inputs]:  Replace TEXLIVE-TINY with a call to TEXLIVE-UPDMAP.CFG.
* guix/lint.scm (check-inputs-should-be-native): Check only for
"texlive-updmap.cfg" input name.
2023-07-18 18:16:49 +02:00
Nicolas Goaziou
213cde14e3
guix: Add linter warning about texlive-updmap.cfg and texlive-tiny.
* guix/lint.scm (check-inputs-should-be-native): Warn when TEXLIVE-UPDMAP.CFG
and TEXLIVE-TINY are not native inputs.
2023-07-18 18:16:47 +02:00
Nicolas Goaziou
2e189e8863
guix: texlive importer: Do not pull all "scripts/context/" files.
* guix/import/texlive.scm (texlive-generic-locations): Add "scripts/context/"
since this location is split across multiple packages.
* guix/import/texlive.scm (files->locations): Only single out files from
generic locations, not their sub-directories.  E.g., generic location
"scripts/context/lua/" should not fetch "scripts/context/lua/third/" files.
2023-07-18 18:16:45 +02:00
Nicolas Goaziou
944ace7194
guix: Fix sub-directories in texlive importer locations.
* guix/import/texlive.scm (files->locations): When removing a sub-directory,
make sure to actually remove the sub-directory and not the parent.
2023-07-18 18:16:43 +02:00
Nicolas Goaziou
3f8b75b35c
gnu: Remove texlive-default-updmap.cfg.
* gnu/packages/tex.scm (texlive-scripts): Provide "updmap.cfg", along with
other similar files.
(texlive-default-updmap.cfg): Remove variable.
(texlive-updmap.cfg)[source]: Use TEXLIVE-SCRIPTS source.
[arguments]: Use G-expressions.  Adapt #:INSTALL-PLAN according to source change.
* guix/profiles.scm (texlive-font-maps): Use "updmap.cfg" provided by
TEXLIVE-SCRIPTS instead of now defunct TEXLIVE-DEFAULT-UPDMAP.CFG.
2023-07-18 18:16:08 +02:00
Nicolas Goaziou
19fd100413
gnu: Externalize libkpathsea in texlive and texlive-bin.
* gnu/packages/tex.scm (texlive-libkpathsea): New variable.
(texlive-bin): Inherit from above.
[arguments]<#:configure-flags>: Use "--disable-kpathsea",
"--with-system-kpathsea", "--with-kpathsea-includes" and
"--with-kpathsea-lib".
<#:phases>: Remove phases now handled by the package above.
[native-inputs]: Add GROFF-MINIMAL.
[propagated-inputs]: Add TEXLIVE-LIBKPATHSEA.
(texlive-bin-full): New variable.
(texlive-texmf)[build-system]: Use COPY-BUILD-SYSTEM.
[arguments]: Set #:INSTALL-PLAN accordingly.  Replace TEXLIVE-BIN with
TEXLIVE-BIN-FULL.
* guix/profiles.scm (texlive-font-maps): Fetch executables from
TEXLIVE-LIBKPATHSEA instead of TEXLIVE-BIN.
2023-07-18 18:16:08 +02:00
Nicolas Goaziou
4d171bf03f
guix: texlive importer ignores "-dev" packages in propagated inputs.
* guix/import/texlive.scm (translate-depends): Skip "-dev" packages.
2023-07-18 18:15:54 +02:00
Nicolas Goaziou
f3cdb6e203
guix: texlive importer allows meta-packages to build TeX formats.
* guix/import/texlive.scm (tlpdb->package): A package with no locations can
still build TeX format files, and therefore may use TEXLIVE-BUILD-SYSTEM.
2023-07-18 18:15:54 +02:00
Nicolas Goaziou
aea0d94bc1
guix: Handle asl2.0 license in texlive importer.
* guix/import/texlive.scm (string->license): Convert "apache2" to ASL2.0.
2023-07-18 18:15:50 +02:00
Nicolas Goaziou
b72c282d53
guix: Make "gfsl" an alias for gfl1.0 license in texlive importer.
* guix/import/texlive.scm (string->license): Make "gfsl" and alias for GFL1.0.
2023-07-18 18:15:46 +02:00
Nicolas Goaziou
7b45ead9ec
gnu: Update TeX Live packages to 2023.0 (rev 66594).
In addition to refreshing the hashes, updating includes removing spurious
propagated inputs, deprecating removed packages, adding missing dependencies,
and fixing build issues.

* guix/build-system/texlive.scm (%texlive-tag):
(%texlive-revision): Update to 2023.0 (rev 66594).
(%texlive-date): Remove unused variable.
* gnu/packages/tex.scm (texlive-hypdoc):
(texlive-lua-uni-algos):
(texlive-cyrillic-bin):
(texlive-epstopdf): New package.
(texlive-soulutf8): Deprecate variable.
(texlive-scripts):
(texlive-hyphen-complete):
(texlive-tex):
(texlive-latex):
(texlive-bidi):
(texlive-alphalph):
(texlive-docstrip):
(texlive-unicode-data):
(texlive-hopatch):
(texlive-hyphen-base):
(texlive-dvipdfmx):
(texlive-dvips):
(texlive-metafont):
(texlive-mfirstuc):
(texlive-mptopdf):
(texlive-fontinst):
(texlive-tex-gyre):
(texlive-lm):
(texlive-lwarp):
(texlive-mflogo-font):
(texlive-mfware):
(texlive-etex):
(texlive-hardwrap):
(texlive-kpathsea):
(texlive-kpfonts):
(texlive-latex-bin):
(texlive-atenddvi):
(texlive-attachfile):
(texlive-epstopdf-pkg):
(texlive-filehook):
(texlive-fancyvrb):
(texlive-gincltex):
(texlive-graphics-def):
(texlive-graphics):
(texlive-greek-fontenc):
(texlive-hycolor):
(texlive-xcolor):
(texlive-hyperref):
(texlive-pdftex):
(texlive-acronym):
(texlive-preview):
(texlive-ucs):
(texlive-varwidth):
(texlive-acmart):
(texlive-titlesec):
(texlive-metapost):
(texlive-dejavu):
(texlive-libertine):
(texlive-hyperxmp):
(texlive-oberdiek):
(texlive-rerunfilecheck):
(texlive-onedown):
(texlive-tools):
(texlive-l3kernel):
(texlive-l3backend):
(texlive-l3packages):
(texlive-fontspec):
(texlive-sansmathfonts):
(texlive-l3build):
(texlive-lualatex-math):
(texlive-lualibs):
(texlive-luatex):
(texlive-luatexbase):
(texlive-luahbtex):
(texlive-luaotfload):
(texlive-amsmath):
(texlive-manfnt-font):
(texlive-babel):
(texlive-csplain):
(texlive-babel-french):
(texlive-cyrillic):
(texlive-default-updmap.cfg):
(texlive-blindtext):
(texlive-environ):
(texlive-etoc):
(texlive-hanging):
(texlive-fira):
(texlive-firstaid):
(texlive-newfloat):
(texlive-newunicodechar):
(texlive-newverbs):
(texlive-seminar):
(texlive-stackengine):
(texlive-currfile):
(texlive-carlisle):
(texlive-geometry):
(texlive-makeindex):
(texlive-paralist):
(texlive-polyglossia):
(texlive-texinfo):
(texlive-textcase):
(texlive-bookmark):
(texlive-changebar):
(texlive-colortbl):
(texlive-fancyhdr):
(texlive-footmisc):
(texlive-lipsum):
(texlive-listings):
(texlive-kvoptions):
(texlive-incgraph):
(texlive-zref):
(texlive-enotez):
(texlive-pdfpages):
(texlive-stix2-otf):
(texlive-sidecap):
(texlive-stmaryrd):
(texlive-media9):
(texlive-ocgx2):
(texlive-needspace):
(texlive-changepage):
(texlive-pgf):
(texlive-koma-script):
(texlive-bitset):
(texlive-kvsetkeys):
(texlive-listofitems):
(texlive-readarray):
(texlive-examplep):
(texlive-xunicode):
(texlive-bibtex):
(texlive-context):
(texlive-beamer):
(texlive-xmpincl):
(texlive-ydoc):
(texlive-pstricks):
(texlive-iftex):
(texlive-tabu):
(texlive-xkeyval):
(texlive-standalone):
(texlive-siunitx):
(texlive-csquotes):
(texlive-logreq):
(texlive-biblatex):
(texlive-biblatex-apa):
(texlive-todonotes):
(texlive-microtype):
(texlive-minted):
(texlive-caption):
(texlive-symbol):
(texlive-fourier):
(texlive-cabin):
(texlive-newtx):
(texlive-xcharter):
(texlive-ly1):
(texlive-ifmtarg):
(texlive-ifoddpage):
(texlive-storebox):
(texlive-collectbox):
(texlive-collection-basic):
(texlive-adjustbox):
(texlive-tcolorbox):
(texlive-eurosym):
(texlive-translations):
(texlive-translator):
(texlive-textpos):
(texlive-unicode-math):
(texlive-xindy):
(texlive-floatflt):
(texlive-fvextra):
(texlive-was):
(texlive-lineno):
(texlive-babel-dutch):
(texlive-babel-polish):
(texlive-setspace):
(texlive-pdflscape):
(texlive-datetime2):
(texlive-tracklang):
(texlive-ragged2e):
(texlive-everysel):
(texlive-breqn):
(texlive-datatool):
(texlive-lastpage):
(texlive-xstring):
(texlive-xetex):
(texlive-soul):
(texlive-xstring):
(texlive-totcount):
(texlive-totpages):
(texlive-xdvi): Update to 2023.0.
2023-07-18 18:15:06 +02:00
Nicolas Goaziou
9fadbf759c
gnu: texlive-bin: Do not install all linked scripts.
* gnu/packages/tex.scm (texlive-scripts): Include only core scripts along with
their man pages and their dependencies.  Also patch them for use in Guix.
(texlive-bin): Simplify package.
[inputs]: Remove "texlive-extra-src" and "texlive-scripts" inputs.  Remove
labels from other inputs.
[propagated-inputs]: Add TEXLIVE-SCRIPTS.
[arguments]: Use G-expressions.
<#:configure-flags>: Add "--disable-linked-scripts".
<#:phases>: Remove phases relative to scripts.
* guix/profiles.scm (texlive-font-maps): Fetch executables from both
TEXLIVE-SCRIPTS and TEXLIVE-BIN.
* guix/import/texlive.scm (tlpdb-file): Grab file from TEXLIVE-SCRIPTS instead
of TEXLIVE-BIN.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
ec97cf1569
guix: Let texlive importer handle linked scripts.
* guix/import/texlive.scm (tlpdb): Also retrieve so-called binfiles.
(formats):
(linked-scripts): New functions.
(tlpdb->package): Use new functions to set #:LINK-SCRIPTS argument and
possibly INPUTS.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, single script, no extension"):
("texlive->guix-package, multiple scripts, with extensions"):
("texlive->guix-package, script with associated input"):  New tests.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
c8e75dfa24
guix: texlive-build-system: Add #:link-scripts argument.
* doc/guix.texi (Build Systems): Document argument.
* guix/build-system/texlive.scm (texlive-build): Add #:LINK-SCRIPTS argument.
* guix/build/texlive-build-system.scm (link-scripts):
(patch-shell-scripts): New function.
(%standard-phases): Add new functions as phases.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
ecc1c3af11
guix: texlive importer: Set #:texlive-latex-bin? when appropriate.
* guix/import/texlive.scm (latex-bin-dependency-tree): New function.
(tlpdb->package): Set #:TEXLIVE-LATEX-BIN? when appropriate.
* tests/texlive.scm ("texlive->guix-package, lonely `hyphen-base' dependency
and ARCH"): Update test.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou
520551a596
gnu: Replace texlive-latex-base with texlive-latex-bin.
Although `latex-base' is clearly defined on CTAN, it isn't a proper TeX Live
package.  Since we're trying to follow as closely as possible this TeX
distribution, we replace the package with the closest one, which is
`texlive-latex-bin'.  As a consequence, the #:TEXLIVE-LATEX-BASE argument
becomes #:TEXLIVE-LATEX-BIN?, emphasizing the fact that the meaningful values
for it are booleans.

* gnu/packages/graphviz.scm (dot2tex)[propagated-inputs]: Remove
TEXLIVE-GRAPHICS, TEXLIVE-LATEX-BASE.  Add TEXLIVE-LATEX-BIN.
* gnu/packages/plotutils.scm (asymptote)[native-inputs]: Remove
TEXLIVE-LATEX-BASE, TEXLIVE-GRAPHICS, TEXLIVE-L3BACKEND.  Use
TEXLIVE-UPDMAP.CFG.
* gnu/packages/sphinx.scm (python-sphinx)[propagated-inputs]: Remove
TEXLIVE-GRAPHICS, TEXLIVE-LATEX-BASE.  Add TEXLIVE-LATEX-BIN.
* gnu/packages/tex.scm (texlive-latex-base): Deprecate variable.
(texlive-hyphen-complete):
(texlive-tex):
(texlive-latex):
(texlive-docstrip):
(texlive-unicode-data):
(texlive-hyphen-base):
(texlive-tex-ini-files):
(texlive-metafont):
(texlive-modes):
(texlive-knuth-lib):
(texlive-latex-fonts):
(texlive-etex):
(texlive-plain):
(texlive-kpathsea):
(texlive-latexconfig):
(texlive-latex-bin):
(texlive-l3kernel):
(texlive-l3backend):
(texlive-l3packages):
(texlive-luatex):
(texlive-luahbtex):
(texlive-babel):
(texlive-cyrillic):
(texlive-pdftex):
(texlive-cm)[arguments]: Replace #:TEXLIVE-LATEX-BASE with #:TEXLIVE-LATEX-BIN?.
(texlive-lm):
(texlive-lua-alt-getopt):
(texlive-luaotfload):
(texlive-graphics-def):
(texlive-graphics-cfg): Set #:TEXLIVE-LATEX-BIN? to #F.
(texlive-graphics):
(texlive-lualibs):
(texlive-firstaid):
(texlive-atveryend)[arguments]: Set #:TEXLIVE-LATEX-BIN? to #F.
[native-inputs]: Add TEXLIVE-DOCSTRIP, TEXLIVE-PDFTEX.
(texlive-updmap.cfg): Remove TEXLIVE-CM, TEXLIVE-GRAPHICS,
TEXLIVE-LATEX-BASE.  Add TEXLIVE-LATEX-BIN.
(texlive-atbegshi)[arguments]: Set #:TEXLIVE-LATEX-BIN? to #F.
[native-inputs]: Add TEXLIVE-DOCSTRIP, TEXLIVE-PDFTEX.
[propagated-inputs]: Remove TEXLIVE-IFTEX, TEXLIVE-INFWARERR and
TEXLIVE-LTXCMDS.
(texlive-everyshi)[arguments]: Build package with a temporary "latex.fmt"
file.
(texlive-cyrillic): Set #:TEXLIVE-LATEX-BIN? to #T.
* guix/build-system/texlive.scm (default-texlive-latex-base): Rename to
TEXLIVE-LATEX-BIN.
(lower): Set default value for TEXLIVE-LATEX-BIN? to #TRUE.
* gnu/packages/statistics.scm (r-with-tests): Remove TEXLIVE-LATEX-BASE and
TEXLIVE-GRAPHICS.
* doc/guix.texi (Build Systems): Document #:TEXLIVE-LATEX-BIN? argument.
Remove reference to #:TEXLIVE-LATEX-BASE.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou
0d7e2380b6
gnu: Simplify texlive-default-updmap.cfg.
* gnu/packages/tex.scm (texlive-default-updmap.cfg): Use TEXLIVE-ORIGIN.
(texlive-updmap.cfg):
* guix/profiles.scm (texlive-font-maps): Update accordingly.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou
36d7acf003
gnu: Deprecate texlive-base in favor of texlive-scheme-basic.
* gnu/packages/tex.scm (texlive-base): Deprecate variable.
(texlive-updmap.cfg): Use default packages from now deprecated TEXLIVE-BASE.
Also remove already implemented TODO.
* doc/build.scm (pdf-manual):
* gnu/packages/statistics.scm: Replace TEXLIVE-BASE with call to
TEXLIVE-UPDMAP.CFG.
* guix/profiles.scm (texlive-font-maps): Trigger TeX Live hook whenever
a texlive package is included in the manifest.
2023-07-18 18:15:02 +02:00
Nicolas Goaziou
0224a8f400
guix: texlive importer: Fix build system and arguments for meta-packages.
* guix/import/texlive.scm (tlpdb->package): Meta packages should use trivial
build system and an appropriate builder.
* tests/texlive.scm ("texlive->guix-package, meta-package"):
("texlive->guix-package, translate dependencies"): Update tests.
2023-07-18 18:12:55 +02:00
Nicolas Goaziou
5f51601bd9
guix: texlive importer ignores dependencies unnecessary in Guix.
* guix/import/texlive.scm (translate-depends): New function.
(tlpdb->package): Use new function.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, translate dependencies"):
("texlive->guix-package, lonely `hyphen-base' dependency and ARCH"): New tests.
2023-07-18 18:12:55 +02:00
Nicolas Goaziou
47913ab452
guix: Let texlive importer suggest format creation.
* guix/import/texlive.scm (tlpdb): Store "execute" entries.
(tlpdb->package): Add #:CREATE-FORMATS argument when there is an AddFormat
execute action.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"): New tests.
2023-07-18 18:12:49 +02:00
Nicolas Goaziou
7ce20143a7
guix: texlive-build-system: Generate TeX formats.
* guix/build-system/texlive.scm (texlive-build): Add #:CREATE-FORMATS argument.
* doc/guix.texi (Build Systems): Document it.
* guix/build/texlive-build-system.scm (texlive-input?): New function.
(generate-font-metrics): Use new function above.
(create-formats): New function.
(%standard-phases): Add function above to phases.
2023-07-18 18:12:49 +02:00
Nicolas Goaziou
d62b35bbe9
guix: import: Improve importing texlive meta packages.
* guix/import/texlive.scm (tlpdb->package): Generate more appropriate source,
home page and license fields when importing meta packages, i.e., TeX Live
collections and schemes.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, meta-package"): New test.
2023-07-18 18:12:47 +02:00
Nicolas Goaziou
293abb4c4e
guix: texlive-build-system: Handle doc-only packages gracefully.
* guix/build/texlive-build-system.scm (install): Always create #$output, even
if it is empty.
2023-07-18 18:12:46 +02:00
Nicolas Goaziou
a91171ad63
guix: import: Fix Creative Common licenses in texlive importer.
* guix/import/texlive.scm (string->license): Fix symbol used for some CC-BY
licenses.  Add version 4.0 for CC-BY and CC-BY-SA.
2023-07-18 18:12:46 +02:00
Nicolas Goaziou
31cd9a5040
guix: import: Handle native inputs in texlive importer.
* guix/import/texlive.scm (tlpdb->package): Add TEXLIVE-METAFONT as a native
input whenever font metrics are to be generated.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with METAFONT files"): New test.
2023-07-18 18:12:39 +02:00
Nicolas Goaziou
c09a05d06c
guix: texlive-build-system: Generate font metrics.
* guix/build/texlive-build-system.scm (install-as-runfiles):
(generate-font-metrics): New function.
(build): Use INSTALL-AS-RUNFILES.
(%standard-phases): Add new phase.
2023-07-18 18:12:38 +02:00
Nicolas Goaziou
3fc925aa84
guix: import: Fix multiple licenses output in texlive importer.
* guix/import/texlive.scm (string->license): Add missing case and try first to
split license strings before giving up.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, multiple licenses"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
308b3e83c3
guix: import: texlive use full file names for generic directories.
Generic directories, such as "doc/info/" or "doc/man" are shared by multiple
packages.  With this change, the texlive importer specifies the full file name
of package-specific files there, making sure only them are downloaded.

* guix/import/texlive.scm (texlive-generic-locations): New variable.
(files->locations): Renamed from files->directories.
Provide full file names when necessary.
(tlpdb->package): Apply renaming.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
7a6da1e22a
guix: import: Improve home-page generation in texlive importer.
* guix/import/texlive.scm (tlpdb): Also register `catalogue' key.
(tlpdb->package): First try to use catalogue for the home-page, then the
name.
* tests/texlive.scm (%fake-tlpdb): Add tests data.
("texlive->guix-package, with catalogue entry, no inputs"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
4a245129ff
guix: import: Update texlive importer according to new build system.
* guix/import/texlive.scm (tlpdb->package): Generate a package that doesn't
need SIMPLE-TEXLIVE-PACKAGE.
* guix/import/utils.scm (package->definition): Remove special case for
`simple-texlive-package'.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package"): Update test.
("texlive->guix-package, no docfiles"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
3f22dabc2a
guix: texlive-build-system: Improvements on non-trivial packages.
* guix/build/texlive-build-system.scm (build): Ignore temporary build files
when moving runfiles around.  Remove ".drv" source files prior to compiling
files.  Remove need for #:TEX-DIRECTORY keyword.  Handle ".ins" and ".dtx"
files in different directories.
(install): Install docfiles in "doc" output when available.
* guix/build-system/texlive.scm (texlive-build): Remove #:TEX-DIRECTORY.
* doc/guix.texi (Build Systems): Remove reference to #:TEX-DIRECTORY in
TEXLIVE-BUILD-SYSTEM documentation.  Also mention it now tries to compile
".dtx" files when there is no ".ins" file.
2023-07-18 18:10:24 +02:00
Ricardo Wurmus
eda2c23874
scripts/refresh: Remove column from spec line before sorting.
We want to sort by file and line number, but the column number messes
everything up.

This is a follow-up to commit b43841c124.

* guix/scripts/refresh.scm (guix-refresh): Trim the digits on the right of the
location string before comparing them.
2023-07-17 13:51:54 +02:00
Tobias Geerinckx-Rice
4920d11ec1
download: Remove stale Yandex GNOME mirror.
* guix/download.scm (%mirrors): Remove mirror.yandex.ru from gnome.
2023-07-09 02:00:01 +02:00
Tobias Geerinckx-Rice
c2c13e3225
download: Remove broken X.org mirrors.
These are still at <https://www.x.org/wiki/Releases/Download>, but
then that page hasn't been updated since 2018.

* guix/download.scm (%mirrors): Remove mirror.us.leaseweb.net and
x.cs.pu.edu.tw.
2023-07-09 02:00:01 +02:00
Tobias Geerinckx-Rice
158a218dea
download: Remove obsolete kernel.org mirrors.
* guix/download.scm (%mirrors): Remove kernel.osuosl.org and
mirror.linux.org.au.
2023-07-09 02:00:11 +02:00
Tobias Geerinckx-Rice
75c7f790b0
download: Remove obsolete Savannah subdirectory.
* guix/download.scm (%mirrors): Remove ‘releases-noredirect’ URL.
2023-07-09 02:00:02 +02:00
Josselin Poiret
d17879cd0d
guix: platform: Use srfi-34's raise instead of raise-exception.
* guix/platform.scm (lookup-platform-by-system)
(lookup-platform-by-target)
(lookup-platform-by-target-or-system): Use srfi-34's raise instead of
raise-exception.
2023-07-13 19:00:14 +02:00
Josselin Poiret
0dd293b4d9
gnu: Add libc-for-target and glibc/hurd.
* gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch
* gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch
* gnu/packages/patches/glibc-2.37-versioned-locpath.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Register them.

* gnu/packages/base.scm (glibc/hurd, libc-for-target): New variables.
(glibc/hurd-headers): Use glibc/hurd.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)[outputs,
source, arguments]
(glibc-final)[source]: Use libc-for-target instead of glibc.
* gnu/packages/cross-base.scm (cross-libc/deprecated, cross-libc*): Use
libc-for-target.

This part fixes

    https://issues.guix.gnu.org/63641#25

* gnu/packages/commencement.scm (%final-inputs): Change to memoized lambda
taking "system".
* gnu/packages/commencement.scm (canonical-package): Likewise, and update
user, passing (%current-system).
(make-gcc-toolchain): Update user, passing (%current-system).
* gnu/packages/base.scm (%final-inputs): Likewise.
* guix/scripts/refresh.scm (options->update-specs): Likewise.
* guix/build-system/gnu.scm (standard-packages): Add optional "system"
parameter.
(lower): Update caller.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>
2023-07-13 18:20:05 +02:00
Ludovic Courtès
9c51330315
shell: Really take system into account in the cache key.
Fixes <https://issues.guix.gnu.org/63230>.

Previously, when running "guix shell -s X ...", OPTS would contain
something like '((system . "X") ... (system . "DEFAULT")).  Thus, since
'profile-cached-gc-root' would iterate over it in this order, "DEFAULT"
would be passed to 'profile-file-cache-key' and 'profile-spec-cache-key'
instead of "X".

* guix/scripts/shell.scm (profile-cached-gc-root): Reverse OPTS before
entering 'loop'.
2023-07-13 17:20:02 +02:00
Efraim Flashner
691b97aed9
transformations: Allow tuning go packages.
* guix/transformations.scm (build-system-with-tuning-compiler): When
checking if a microarchitecture is supported by the compiler, also check
if it is a go compiler which supports that psabi.  Add a phase after
'setup-go-environment to set the go microarchitecture.
2023-07-12 16:48:28 +03:00
Efraim Flashner
1701b1244d
guix: cpu: Add gcc-architecture->micro-architecture-level mapping.
* guix/cpu.scm (gcc-architecture->micro-architecture-level): New
variable.
2023-07-12 16:48:28 +03:00
Efraim Flashner
4dd5fa9e76
guix: cpu: Refactor cpu->gcc-architecture.
* guix/cpu.scm (cpu->gcc-architecture): Refactor to wrap all the x86_64
options inside a common letrec-syntax.
2023-07-12 16:48:28 +03:00
Efraim Flashner
b93057256f
guix: cpu: Rewrite fallback for x86_64 cpu->gcc-architecture.
* guix/cpu.scm (cpu->gcc-architecture): Adjust the fallback case to use
cpu->micro-architecture-level.
2023-07-12 16:48:28 +03:00
Efraim Flashner
cb0cab2db0
guix: cpu: Add generalized CPU matching.
* guix/cpu.scm (cpu->micro-architecture-level): New variable.
2023-07-12 16:48:27 +03:00
Ricardo Wurmus
febe08ee8a
import/cran: Add one more package name transformation.
* guix/import/cran.scm (transform-sysname): Add entry for "zlib-devel".
2023-07-12 14:29:02 +02:00
Ricardo Wurmus
b43841c124
refresh: Sort update specs by package location.
Fixes <https://issues.guix.gnu.org/64358>.

* guix/scripts/refresh.scm (guix-refresh): Sort update specs by location from
bottom to top before updating packages.
2023-07-12 14:29:01 +02:00
nathan
9cf2f08852
avahi: Fix exception when #:timeout is #f.
* guix/avahi.scm (avahi-publish-service-thread): Fixes crash when timeout is
  #f, which is the default for "guix publish --advertise"

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-11 15:47:56 +02:00
Ludovic Courtès
fe3321f91a
cache: 'file-expiration-time' uses 'lstat', not 'stat'.
Fixes a bug whereby 'cached-channel-instance' would potentially consider
cache entries obsolete too early because they refer to items in the
store, which is mounted as 'noatime' on Guix System.

* guix/cache.scm (file-expiration-time): Use 'lstat' and
'false-if-exception' rather than 'stat'.  This matches what (guix
scripts shell) does.
2023-07-11 15:47:56 +02:00
Ludovic Courtès
e1c2c2f042
locate: Ignore unreadable manifests.
Fixes <https://issues.guix.gnu.org/64187>.

* guix/scripts/locate.scm (profiles->manifest-entries): Wrap
'profile-manifest' in 'false-if-exception'.

Reported-by: Ricardo Wurmus <rekado@elephly.net>
2023-07-11 15:47:55 +02:00
Ludovic Courtès
0ae419877c
avahi: Poll less.
* guix/avahi.scm (avahi-publish-service-thread): Have #:timeout default
to #f when 'stop-loop?' is NEVER, or 500ms.
(avahi-browse-service-thread): #:timeout defaults to 500ms when
'stop-loop?' is provided.
2023-07-07 15:30:21 +02:00
Efraim Flashner
c7eed71681
guix: git: Set initial branch name for git-fetch.
This removes the 'hint' about choosing a branch name when creating a new
git repository.

* guix/build/git.scm (git-fetch): When running 'git init' add an initial
branch name.
2023-07-05 18:57:29 +03:00
Lars-Dominik Braun
37c2e94cec
guix: node-build-system: Delete from peerDependencies too.
The current version of npm in Guix installs peerDependencies by default,
whereas previously it would just warn about missing/wrong packages.

Fixes <https://issues.guix.gnu.org/issue/64203>.

* guix/build/node-build-system.scm (delete-dependencies): Remove supplied
dependencies from peerDependencies field too.
2023-06-22 12:54:19 +02:00
Ludovic Courtès
1b7aabbc79
Add 'guix locate'.
* guix/scripts/locate.scm, tests/guix-locate.sh: New files.
* Makefile.am (MODULES): Add 'guix/scripts/locate.scm'.
(SH_TESTS): Add 'tests/guix-locate.sh'.
* po/guix/POTFILES.in: Add it.
* doc/guix.texi (Invoking guix locate): New node.

Co-authored-by: Antoine R. Dumont <antoine.romain.dumont@gmail.com>
2023-06-18 23:44:29 +02:00
Ludovic Courtès
1261ce1523
store: Tolerate non-existent GC root directories.
* guix/store/roots.scm (gc-roots): Wrap 'scandir*' call in 'catch'.
* tests/store-roots.scm ("gc-roots, initial"): New test.  Move
'open-connection' call below.
2023-06-18 23:36:25 +02:00
Janneke Nieuwenhuizen
ff690faf66
gnu: Use target-hurd?, system-hurd? instead of hurd-target?, hurd-system?.
* gnu/packages/hurd.scm (hurd-target?): Remove.
(hurd-system?): Move to...
* guix/utils.scm (system-hurd?): ...here.
* gnu/packages/*: Update all users, removing (gnu packages hurd) include where
now unused.
2023-06-17 14:38:32 +02:00
Ludovic Courtès
248cf06149
avahi: Resolve hosts for which name resolution fails.
This avoids attempts to connect to hosts that went off-line.  This is
particularly important for 'guix-daemon --discover', which would so far
keep attempting to talk to LAN hosts after they vanished just because
their mDNS record hasn't expired, leading to significant delays when
fetching narinfos and substitutes.

* guix/avahi.scm (avahi-browse-service-thread)[service-resolver-callback]:
Add handler to RESOLVER-EVENT/FAILURE.
2023-06-16 00:14:52 +02:00
Ludovic Courtès
99a27d361e
guix home: Add missing SRFI-34 import for 'raise'.
Reported at <https://issues.guix.gnu.org/64031>.

* guix/scripts/home.scm: Use (srfi srfi-34), expected by
'list-generations'.

Reported-by: Steven Roose <steven@roose.io>
2023-06-16 00:14:52 +02:00
Ludovic Courtès
a3beb8d741
pull: Preserve channel ordering when using '--commit', '--url', etc.
Previously using '--url', '--commit', or '--branch' would move the
'guix' channel to the front.  This is okay in itself but it gratuitously
leads to a different cache key in 'cached-channel-instance'--IOW, 'guix
time-machine --commit=X' where X is already in cache would gratuitously
recompute the channel derivations.

* guix/scripts/pull.scm (channel-list): Use 'map' instead of 'find' +
'remove' + 'cons'.
2023-06-16 00:14:52 +02:00
Ludovic Courtès
e4259d4e9e
packages: 'package-transitive-supported-systems' detects cycles.
With this change, commands such as 'guix build' or 'guix package' report
obvious package-level cycles upfront.  Derivation-level cycles are not
detected.

* guix/packages.scm (&package-cyclic-dependency-error): New condition
type.
(package-transitive-supported-systems): Define 'visited', check it, and
parameterize it.
* guix/ui.scm (call-with-error-handling): Handle
'&package-cyclic-dependency-error'.
* tests/packages.scm ("package-transitive-supported-systems detects
cycles"): Add test.
2023-06-14 22:54:30 +02:00
Ricardo Wurmus
4699de59ff
import/cran: Add another clause for ASL 2.0.
* guix/import/cran.scm (string->license): Add clause for >= 2.0.
2023-06-14 14:09:35 +02:00
Timothy Sample
e6da6e3152
svn-download: Do not expand keywords.
Subversion keyword expansion is potentially non-reproducible as some of
them expand time strings relative to the local time zone:

  https://issues.guix.gnu.org/43442#18

In practice this is not a problem in Guix since Subversion checkouts
happen in an isolated environment using the "default timezone" (UTC).

However, Software Heritage disables keyword expansion for this very
reason.  By following suit, we make sure content can be retrieved from
there.

* guix/build/svn.scm (svn-fecth): Pass "--ignore-keywords" to
Subversion.
* guix/build-system/texlive.scm (%texlive-date): New variable.
* gnu/packages/java.scm (java-geronimo-xbean-reflect)
(java-geronimo-genesis-2.1): Update the source hash.
* gnu/packages/machine-learning.scm (ghmm): Likewise.
* gnu/packages/video.scm (libsmpeg, libsmpeg-with-sdl1): Likewise.
* gnu/packages/tex.scm (texlive-bin): Update the hash of the
"texlive-scripts" input, and a add a new phase that imitates
Subversion keyword expansion for scripts that need it.
(texlive-latex-base): Update the hash of the "texlive-luatexconfig"
native input.
(texlive-hyphen-base, texlive-dvipdfmx, texlive-dvips, texlive-cm)
(texlive-tex-plain, texlive-kpathsea, texlive-latexconfig)
(texlive-tetex, texlive-pdftex, texlive-xetex): Update the source
hash.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-06-11 18:13:44 +02:00
Ludovic Courtès
1c9e992e8c
records: Remove "guix" from error message.
* guix/records.scm (map-fields): Tweak error message.
2023-06-09 14:19:14 +02:00
Ludovic Courtès
53bf9fba0c
tests: Ensure 'elpa' test does not access the network.
Previously it would try to access the real elpa.gnu.org.  This would
succeed when network is available because "taxy-magit-section" is an
existing package.

* guix/import/elpa.scm (elpa-repository)
(package-from-elpa-repository?): Recognize 'gnu/http.
* tests/elpa.scm ("package-latest-release"): Use 'http' instead of
'https'.  Change "taxy-magit-section" to "fake-taxy-magit-section".
2023-06-09 14:19:14 +02:00
Ludovic Courtès
df8b3821a8
import: stackage: Updater resolves inputs lazily.
Fixes the "haskell-stackage" test in 'tests/lint.scm', which started
failing with e6223017d9 because the extra
HTTP GETs induced by the 'haskell-fetch' calls would fail.

* guix/import/stackage.scm (latest-lts-release): Call 'hackage-fetch'
and its continuation from within 'inputs', which is delayed.  Pass it
NAME-VERSION instead of HACKAGE-NAME-VERSION.
2023-06-09 14:19:14 +02:00
Ludovic Courtès
885d524f79
substitute: Gracefully retry after failed partial downloads.
Fixes <https://issues.guix.gnu.org/63443>.
Reported by Attila Lendvai <attila@lendvai.name>.

* guix/scripts/substitute.scm (catch-system-error): New macro.
(download-nar): Add call to 'delete-file-recursively'.
* tests/substitute.scm ("substitute, previous partial download around"):
New test.
2023-06-08 22:54:58 +02:00
Ludovic Courtès
3f5e141829
substitute: Delete cached narinfos more than two-month old.
This allows 'guix substitute' to shrink the cache a bit more, which
saves space and improves performance of cache-cleanup phases since fewer
entries need to be traversed.

* guix/scripts/substitute.scm (cached-narinfo-expiration-time): Define
'max-ttl' and use it as an upper bound.
2023-06-08 22:27:20 +02:00
Ludovic Courtès
92ee0fd5eb
import: Gracefully handle EPIPE.
Previously, "guix import pypi f3 | head -3" would print a backtrace.

* guix/scripts/import.scm (guix-import): Wrap
'pretty-print-with-comments' call in 'leave-on-EPIPE'.
2023-06-08 22:06:00 +02:00
Ludovic Courtès
dc0c5d56ee
records: Use SRFI-11 instead of SRFI-71, for Guile 2.0 compatibility.
This fixes a failure of 'tests/packages.scm' introduced in
b88e38d4b5: some of the tests import (guix
records) on the build side, which uses '%bootstrap-guile' (Guile 2.0)
where SRFI-71 is unavailable.

* guix/records.scm (match-record-inner): Use SRFI-11 instead of SRFI-71.
2023-06-06 11:54:39 +02:00
Ricardo Wurmus
a025d8fee6
import/cran: Ensure current package is not among inputs.
* guix/import/cran.scm (cran-package-inputs): Remove the current package from
the result.
2023-06-05 18:55:11 +02:00
Josselin Poiret
cacc0cb6ab
channels: Raise an error if dependency's introduction is malformed
* guix/channels.scm (sexp->channel-introduction): Do it.
2023-06-04 11:30:18 +02:00
Josselin Poiret
80d1228321
build-system: New agda-build-system.
* guix/build-system/agda.scm: New file.
* guix/build/agda-build-system.scm: New file.
* Makefile.am (MODULES): Register them.
* doc/guix.texi (Build Systems): Add documentation for agda-build-system.
2023-06-04 10:59:34 +02:00
Josselin Poiret
0769a9b3c5
build-system/haskell: Export default-haskell.
* guix/build-system/haskell.scm: Export default-haskell.
2023-06-04 10:59:33 +02:00
Josselin Poiret
f045c7ac80
records: match-record: Do not show internal form.
* guix/records.scm (lookup-field+wrapper): Attach source properties to the
field syntax object instead.
2023-06-04 10:59:28 +02:00
(unmatched-parenthesis ew syntax
4cd5293621
records: Add MATCH-RECORD-LAMBDA.
* guix/records.scm (match-record-lambda): New syntax.
* tests/records.scm ("match-record-lambda"): New test.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:59:25 +02:00
(unmatched-parenthesis d
b88e38d4b5
records: match-record: Support thunked and delayed fields.
* guix/records.scm (match-record): Unwrap matched thunked and delayed fields.
* tests/records.scm ("match-record, thunked field",
"match-record, delayed field"): New tests.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:34:35 +02:00
(unmatched-parenthesis
1a4aace3af
records: match-record: Raise a syntax error if TYPE is nonexistent.
* guix/records.scm (match-record): Raise a human-compherensible syntax error
  if the given record type identifier is unbound.

Co-authored-by: Josselin Poiret <dev@jpoiret.xyz>
Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:34:33 +02:00
Ludovic Courtès
69dfdb7bd1
environment: Fix unbound-variable bug with '--symlink'.
Fixes <https://issues.guix.gnu.org/63845>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* guix/scripts/environment.scm (launch-environment/container): Reference
'evaluate-populate-directive' before calling 'call-with-container'.
2023-06-02 16:57:17 +02:00
Ludovic Courtès
0a8f53d61b
read-print: Add 'package/inherit' special form.
* guix/read-print.scm (%special-forms): Add 'package/inherit'.
2023-06-02 15:47:27 +02:00
Ludovic Courtès
acef4cecf9
ci: Reify the timestamps of evaluations.
* guix/ci.scm (<evaluation>)[start-time, checkout-time,
completion-time]: New fields.
2023-06-02 15:47:27 +02:00
Ricardo Wurmus
c2f0ce73a7
import/cran: string->license: Add another case for GPLv3+.
* guix/import/cran.scm (string->license): Translate "GPL (>=3)" to gpl3+.
2023-06-02 12:52:22 +02:00