Commit Graph

7536 Commits

Author SHA1 Message Date
Ludovic Courtès 5283d24062
shell: Disable caching for ‘guix shell -f guix.scm’.
Fixes <https://issues.guix.gnu.org/64858>.

* guix/scripts/shell.scm (profile-cached-gc-root): Distinguish the two
‘load’ cases; return #f and #f for (load ad-hoc-package _).

Reported-by: Pierre-Henry Fröhring <phfrohring@deeplinks.com>.
Change-Id: I00282fbd41aeed09fb927690945cf65e1f9efe4d
2023-11-22 23:55:12 +01:00
Felix Lechner 762be40098
shell: Correct cache key for ‘guix shell -f guix.scm’.
Partially fixes <https://issues.guix.gnu.org/64858>.

Fixes a bug whereby ‘guix shell -f guix.scm’ would use the same cache
key as ‘guix shell’ in an empty directory (meaning: no packages
specified) and would ignore the mtime of ‘guix.scm’.

* guix/scripts/shell.scm (profile-cached-gc-root): In ‘load’ case,
recognize both the ‘package’ and ‘ad-hoc-package’ tags.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: Ice6d0ac43e1dc6bb335a17963364c2cc6bcd076d
2023-11-22 23:55:12 +01:00
Ludovic Courtès b150c546b0
git: Shell out to ‘git gc’ when necessary.
Fixes <https://issues.guix.gnu.org/65720>.

This fixes a bug whereby libgit2-managed checkouts would keep growing as
we fetch.

* guix/git.scm (packs-in-git-repository, maybe-run-git-gc): New
procedures.
(update-cached-checkout): Use it.
2023-11-22 16:51:47 +01:00
Ludovic Courtès 2c5fb13a05
read-print: Properly indent ‘parameterize’.
Fixes <https://issues.guix.gnu.org/65427>.

* guix/read-print.scm (%special-forms): Add ‘parameterize’.
* tests/read-print.scm: Add test.

Reported-by: Maxime Devos <maximedevos@telenet.be>
Change-Id: I922bffc527ade539cf2eb304acb25bc9c705a459
2023-11-22 16:51:46 +01:00
Ludovic Courtès c39c89c11e
style: ‘guix style -f’ warns when passed zero arguments.
* guix/scripts/style.scm (guix-style): When OPTS has ‘whole-file?’ set,
warn when FILES is empty.

Change-Id: I494f52ef5d070510d20006e6dd987a6805161bb4
2023-11-22 16:51:45 +01:00
Christopher Baines 98ae807643
build-system: clojure: Use the standard error regarding cross builds.
Rather than raising an error in the build system.

* guix/build-system/clojure.scm (lower): Return #f for cross builds, rather
than calling error.

Change-Id: Id97c8f5140f55fe2c52ccb0db36fd993922c6a7e
2023-11-20 14:53:59 +00:00
Tomas Volf 3493832260
build-system/guile: Add target-guile-scm+go procedure.
The paths to .scm and .go files can be constructed given a guile version and a
base directory.  However it is few lines of code that needs to be copy&pasted.
This new procedure returns both of them reducing the maintenance cost.

* guix/build/guile-build-system.scm (target-guile-scm+go): New procedure.

Change-Id: I58615f2cfe0ec1e58d3fbb47b738ed5dce1bb252
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-11-15 18:29:37 +01:00
Ludovic Courtès 69d9a02094
locate: Accept ‘--clear’ without additional arguments.
Fixes a bug whereby ‘guix locate --clear’ would end with the “no files
to search for” error.

Fixes <https://issues.guix.gnu.org/66799>.

* guix/scripts/locate.scm (guix-locate): Do not emit “no files to search
for” error when 'clear? is set in OPTS.
* tests/guix-locate.sh: Test it.

Reported-by: Maciej Kalandyk <m.kalandyk@outlook.com>
Change-Id: Ib8fa125c18481d7f5408bd89df9503713527641d
2023-11-15 18:29:37 +01:00
Efraim Flashner 911c3deb40
guix: platform: Add platform-rust-target.
* guix/platform.scm <platform>: Add rust-target field.
* guix/platforms/arm.scm (armv7-linux, aarch64-linux): Add the system's
rust target triplet.
* guix/platforms/mips.scm (mips64-linux):
* guix/platforms/powerpc.scm (powerpc-linux, powerpc64-linux,
powerpc64le-linux):
* guix/platforms/riscv.scm (riscv64-linux):
* guix/platforms/x86.scm (i686-linux, x86_64-linux, i686-mingw,
x86_64-mingw, i586-pc): Same.

Change-Id: Id9dca0fb8ec2b3bf2b3876b974e4bbaa30dbc6a6
2023-12-11 13:50:48 +02:00
Jean-Pierre De Jesus DIAZ 06587003b8
guix: meson-build-system: Disable PIC for AVR.
* guix/build-system/meson.scm (make-built-in-options-alist): New procedure.
(make-cross-file): Add 'built-in options' section to cross file.

Change-Id: Ifff7f6fb1eb8b0e8ddd04881d22acb863c9e85b2
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 13:37:20 +02:00
Jean-Pierre De Jesus DIAZ 119edc3c9b
guix: meson-build-system: Support AVR.
* guix/build-system/meson.scm (make-machine-alist): Add cases for avr
for system, cpu_family and cpu.

Change-Id: Ie47d666099c4c48edd36812f035625dccc4a3900
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 13:36:52 +02:00
Jean-Pierre De Jesus DIAZ 520e3d267e
guix: Add target-avr?.
* guix/utils.scm (target-avr?): New procedure.
* tests/utils.scm: Add tests for target-avr? procedure.

Change-Id: Iaa0fa97a2b6bc45d45f907f43157f1548a0ba3fa
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 11:53:54 +02:00
Jean-Pierre De Jesus DIAZ be5ec2ebb4
guix: Add avr platform.
* Makefile.am (MODULES): Add avr platform module.
* doc/guix.texi: Add documentation for avr platform.
* guix/platforms/avr.scm (avr): New variable.

Change-Id: I0f425eac61a71390b618e093f5a034ad4205a6f4
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 11:53:54 +02:00
Jean-Pierre De Jesus DIAZ b40a44430f
guix: gnu-build-system: Handle missing libc.
* guix/build-system/gnu.scm (standard-cross-packages): Handle the case
  when `cross-libc` returns #f.

Change-Id: I85ee5456f10ff141d521a5f2d91267cd612c5616
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 11:53:54 +02:00
Julien Lepiller 28ca80717d
guix: Properly compute progress bar width.
* guix/progress.scm (progress-reporter/bar): Take font width into account to
compute progress bar width.
* guix/git.scm (show-progress): Take font width into account to compute
progress bar width.

Change-Id: I946e447c1ea7c6eb4ff805400280f39e8f1a7c02
2023-11-11 11:07:47 +01:00
Julien Lepiller fd11d7fbf8
guix: syscalls: Add terminal-string-width.
* guix/build/syscalls.scm (terminal-width): New procedure.
* tests/syscalls.scm: Add tests.

Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3
2023-11-11 11:07:27 +01:00
Tristan Cottam 9ce47b6fdd
build: minetest-build-system: Match name more strictly.
Some Minetest mods, such as the hitherto unpackaged minetest-ambience,
have trailing garbage space (e.g. carriage returns) in their name line,
that would otherwise end up as part of the mod's directory name.

* guix/build/minetest-build-system.scm (name-regexp): Only match
graphical characters in the name sub-match.

Change-Id: I95f4c201724991a10efba5c859bfef99779ea495
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-11-11 06:48:59 +01:00
Julien Lepiller 00ec39a4e4
guix: ant: Optionally build with java modules.
Modules were introduced in Java 9 and are not supported by the default
icedtea compiler, so this feature is disabled by default.

* guix/build-system/ant.scm (ant-build): Add use-java-modules?
parameter.
* guix/build/ant-build-system.scm (default-build.xml)
(configure): Use it.

Change-Id: I3b99238e4cd262332fa5c818be1af5477c7374fd
2023-11-09 19:08:42 +01:00
Jonathan Scoresby 8882ec71dd
build-system: Add vim-build-system.
* guix/build-system/vim.scm,
* guix/build/vim-build-system.scm: New modules.
* Makefile.am (MODULES): Register new files.
* doc/guix.texi: Document it.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-11-08 12:03:05 +02:00
Maxim Cournoyer a4db19d8e0
git-download: Add support for Git Large File Storage (LFS).
* guix/build/git.scm (git-fetch) [lfs?]: New argument, doc and setup code.
(git-fetch-with-fallback) [lfs?]: New argument.  Pass it to git-fetch.
* guix/git-download.scm (git-lfs-package): New procedure.
(git-fetch/in-band*): New procedure, made of the logic of git-fetch/in-band,
with new git-lfs specifics, with the following changes:
New #:git-lfs argument.
<inputs>: Remove labels.  Conditionally add git-lfs.
<build>: Read "git lfs?" environment
variable and pass its value to the #:lfs? argument of git-fetch-with-fallback.
Use INPUTS directly; update comment.
<gexp->derivation>: Add "git lfs?" to #:env-vars.
(git-fetch/in-band): Express in terms of git-fetch/in-band*.
(git-fetch/lfs): New procedure.
* doc/guix.texi (origin Reference): Document it.

Change-Id: I5b233b8642a7bdb8737b9d9b740e7254a89ccb25
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-11-07 12:33:26 -05:00
Leo Famulari cfe09c7c36
download: Replace faulty kernel mirror URL with canonical upstream.
This mirror was providing truncated files. See patch ticket #66923 for more
information about this change:

<https://issues.guix.gnu.org/issue/66923>

* guix/download.scm (%mirrors): Replace kernel mirror <uio.no> with <kernel.org>.

Change-Id: I189fc4eaa2bb3fa8b6db028aa837f0d59a460327
2023-07-23 22:26:00 -04:00
Ludovic Courtès 331d858e21
time-machine: Warn when no command is given.
* guix/scripts/time-machine.scm (guix-time-machine): Emit a warning when
COMMAND-LINE is false.

Change-Id: I26e6b608915ecaf6d9372f9b03dc5ebd1b4c68f9
2023-11-05 23:23:23 +01:00
Ludovic Courtès ab13e2be69
time-machine: Make target commit check cheaper.
Commit 79ec651a28 introduced a check to
error out when attempting to use ‘time-machine’ to travel to a commit
before ‘v1.0.0’.

This commit fixes a performance issue with the strategy used in
79ec651a28 (the repository was opened,
updated, and traversed a second time by ‘validate-guix-channel’) as well
as a user interface issue (“Updating channel” messages would be printed
too late).

This patch reimplements the check in terms of the existing #:validate-pull
mechanism, which is designed to avoid extra repository operations.

Fixes <https://issues.guix.gnu.org/65788>.

* guix/inferior.scm (cached-channel-instance): Change default value
of #:validate-channels.  Remove call to VALIDATE-CHANNELS; pass it
as #:validate-pull to ‘latest-channel-instances’.
* guix/scripts/time-machine.scm (%reference-channels): New variable.
(validate-guix-channel): New procedure, written as a simplification of…
(guix-time-machine)[validate-guix-channel]: … this.  Remove.
Pass #:reference-channels to ‘cached-channel-instance’.

Reported-by: Simon Tournier <zimon.toutoune@gmail.com>
Change-Id: I9b0ec61fba7354fe08b04a91f4bd32b72a35460c
2023-11-05 23:23:23 +01:00
Christopher Baines aa98a97607
lint: Speed up the formatting linter.
By using go-to-location which caches the number of bytes to seek by to get to
specific lines in a file.

* guix/lint.scm (report-formatting-issues): Use go-to-location.

Change-Id: I34e4d3acfbb1e14e026d2e7f712ba8d22b56c147
Signed-off-by: Christopher Baines <mail@cbaines.net>
2023-11-05 17:51:38 +00:00
Simon Tournier 1eb3133355
scripts: edit: Fix relative file-name with 'load-path' option.
* guix/scripts/edit.scm (search-path*): Return 'file' if exists when
'search-path' fails.

Change-Id: I891d63d0d28577a7d1732fc59435828ecc0a5c5a
2023-11-05 16:11:17 +01:00
Ricardo Wurmus 7a14f9365a
guix: Upgrade to Bioconductor 3.18.
* guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to
3.18.
* guix/import/cran.scm (%bioconductor-version): Same.

Change-Id: Ic3fc2e6ab6b5f6f6e55662f81baee67391158c5b
2023-11-03 22:49:10 +01:00
Efraim Flashner 84fbfa82af
build-system/go: Use gccgo when go isn't supported.
* guix/build-system/go.scm (default-gccgo): New variable.
(lower): Only use default-go when it is supported.

Change-Id: I30564d97703344df582accaf741f4fcd159b6be1
2023-10-28 22:02:32 +03:00
Ludovic Courtès 6eb147dc31
environment: Fix typo in error messages.
* guix/scripts/environment.scm (guix-environment*): Fix typo in error
messages.

Change-Id: I0b8669cb43267d0456a70f3b157514a6bcc725e8
2023-10-28 01:23:41 +02:00
Ludovic Courtès 661672a7f8
environment: Parameterize ‘%graft?’ early on.
Previously, ‘%graft?’ would be parameterized after ‘package-derivation’
had been called for ‘%guile-for-build’, which is too late.

* guix/scripts/environment.scm (guix-environment*)[with-store/maybe]:
Parameterize ‘%graft?’.
Remove ‘%graft?’ parameterization from body.

Change-Id: I65ef4a8c5f27e19a49196005871e5f7057fabaec
2023-10-28 01:21:56 +02:00
Ludovic Courtès 344e39c928
profiles: Hooks honor the #:system parameter of ‘profile-derivation’.
Fixes <https://issues.guix.gnu.org/65225>.

* guix/profiles.scm (info-dir-file, package-cache-file)
(info-dir-file, ghc-package-cache-file, ca-certificate-bundle)
(emacs-subdirs, gdk-pixbuf-loaders-cache-file, glib-schemas)
(gtk-icon-themes, gtk-im-modules, linux-module-database)
(xdg-desktop-database, xdg-mime-database, fonts-dir-file)
(manual-database, manual-database/optional): Add optional #:system
parameter and pass it to ‘gexp->derivation’.
(profile-derivation): Pass HOOK a second parameter, SYSTEM.
* gnu/bootloader.scm (efi-bootloader-profile)[efi-bootloader-profile-hook]:
Add optional #:system parameter and pass it to ‘gexp->derivation’.
* guix/channels.scm (package-cache-file): Likewise.
* tests/profiles.scm ("profile-derivation, #:system, and hooks"): New
test.

Reported-by: Tobias Geerinckx-Rice <me@tobias.gr>
2023-10-28 00:17:24 +02:00
Ludovic Courtès 9d4b720e1f
packages: Add ‘system’ parameter for ‘set-guile-for-build’.
* guix/packages.scm (set-guile-for-build): Add ‘system’ parameter.
2023-10-28 00:17:24 +02:00
Ludovic Courtès b3ec2a0d37
environment: Honor ‘-s’ for guile-for-build.
Partly fixes <https://issues.guix.gnu.org/65225>.

* guix/scripts/environment.scm (guix-environment*): Pass SYSTEM to
‘package-derivation’ when defining ‘%guile-for-build’.

Reported-by: Simon Tournier <zimon.toutoune@gmail.com>
Change-Id: I9d883f1e61fac72754fdc9dee9b7c8a3dea32add
2023-10-28 00:17:24 +02:00
Ludovic Courtès 67effc1560
grafts: Fix corner case involving multiple-output derivations.
Fixes a bug that would occur with references to two outputs of the same
derivation, with one of them referring to the other one.

For example, the references of libreoffice include both mariadb:dev and
mariadb:lib; additionally, mariadb:dev refers to mariadb:lib.  In this
case, the glibc graft would not be applied on one of the mariadb paths,
and both the grafted and ungrafted glibc would end up in the closure of
libreoffice.

Fixes <https://issues.guix.gnu.org/66662>.

* guix/grafts.scm (non-self-references): Simplify and include references
to outputs of DRV other than OUTPUTS.
(reference-origins): Simplify and possibly return outputs of DRV itself.
(cumulative-grafts)[graft-origin?]: Add OUTPUT parameter and honor it.
[dependency-grafts]: Adjust accordingly.
* tests/grafts.scm ("graft-derivation, multiple outputs need to be replaced"):
New test.

Change-Id: Iac2005024ab7049037537b3af55298696ec90e3c
2023-10-28 00:17:23 +02:00
Zheng Junjie dd3b9e84b9
utils: Add 'strip-for-target'.
* guix/utils.scm (strip-for-target): New procedure.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-10-26 15:21:35 +02:00
Sören Tempel dae956e796
syscalls: Consistently use existing linux? definition.
Instead of duplicating this existing logic across the source file. This
will make it easier to add additional linux targets (e.g. linux-musl) in
the future.

* guix/build/syscalls.scm (readdir*, write-socket-address!)
(read-socket-address): Use linux? constant.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I833c1d1630dcb8319584de1ea918cb22696f0058
2023-10-23 11:58:16 +02:00
Sören Tempel 54e6788267
syscalls: Add support for musl libc.
This commit allows using Guix on a foreign distro which uses musl libc,
for example, Alpine Linux. Usage of musl libc is detected via a new
musl-libc? variable using the Guile %host-type.

Using the new musl-libc? variable, we can now implement musl-specific
quirks. The two compatibility problems I encountered in this regard are
that musl dose not export a readdir64 and statfs64 symbol. On musl,
these two functions are implemented as CPP macros that expand to
readdir/statfs. To workaround that, a case-distinction was added.

The existing linux? variable has been modified to return true if the
%host-system contains "linux-" in order to ensure it is true for both
linux-gnu as well as linux-musl host systems.

The patch has been tested on Alpine Linux and is already used for the
downstream Guix package shipped in Alpine Linux's package repository.

* guix/build/syscalls.scm (musl-libc?): New variable.
(linux?): Truth value on any linux system.
(statfs, readdir-procedure): Support musl libc.

Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: Icc4101a062381240f977f4550344bde696513c52
2023-10-23 11:56:54 +02:00
Ludovic Courtès 48c1a74b24
build-system/dub: Remove dependency on (guix build syscalls).
The (guix build syscalls) module was unused.

* guix/build-system/dub.scm (%dub-build-system-modules): Remove (guix
build syscalls).
2023-10-23 11:56:54 +02:00
Ludovic Courtès 4b5e31dc5e
build-system/android-ndk: Remove dependency on (guix build syscalls).
The (guix build syscalls) module was unused.

* guix/build-system/android-ndk.scm (%android-ndk-build-system-modules):
Remove (guix build syscalls).
2023-10-23 11:56:54 +02:00
Ludovic Courtès 542c906f16
build-system/ant: Remove dependency on (guix build syscalls).
The module has been unused since
a6343af221.

* guix/build-system/ant.scm (%ant-build-system-modules): Remove (guix
build syscalls).
2023-10-23 11:56:54 +02:00
Efraim Flashner 742554f9b9
guix: import: Don't import yanked rust crates.
* guix/import/crate.scm (<crate-version>): Add yanked? field.
(crate->guix-package)[find-crate-version]: Remove versions which have
been yanked.
* tests/crate.scm: Adjust tests for new yanked? field.
2023-10-22 16:46:39 +03:00
Efraim Flashner e6af40d7b4
Merge remote-tracking branch 'origin/rust-team' 2023-10-21 20:34:46 +03:00
Ekaitz Zarraga e011961f99
build-system: Add zig-build-system.
* guix/build-system/zig.scm: New file.
* guix/build/zig-build-system.scm: New file.
* Makefile.am: Add them.
* doc/guix.texi: Document it.
* etc/snippets/yas/scheme-mode/guix-package (build-system): Add
  zig-build-system.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-10-21 00:27:25 +02:00
Efraim Flashner 003dc790fd
Revert "build: cargo-build-system: Disable tests by default."
This reverts commit 37667443074a6de29f7665868f102111d62f0af9.

This change needs more discussion.
2023-10-18 11:36:31 +03:00
Efraim Flashner 0058ed81b0
build: cargo-build-system: Find more pregenerated files.
* guix/build/cargo-build-system.scm (check-for-pregenerated-files): Also
search for MacOS dynamic libraries.
2023-10-18 11:36:21 +03:00
Efraim Flashner d631d901d8
build: cargo-build-system: Disable tests by default.
* guix/build-system/cargo.scm (cargo-build): Disable tests by default.
* gnu/packages/admin.scm (greetd, wlgreet, du-dust),
* gnu/packages/bioinformatics.scm (circtools, python-gseapy),
* gnu/packages/crypto.scm (rust-minisign, b3sum),
* gnu/packages/gnome.scm (librsvg),
* gnu/packages/python-crypto.scm (python-blake3,
python-cryptography-rust),
* gnu/packages/python-xyz.scm (python-orjson),
* gnu/packages/rust-apps.scm (agate, alfis, bat, diffr, drill, dutree,
exa, fd, hexyl, hyperfine, i3status-rust, just, maturin, ripgrep, rot8,
rust-swc, rust-cargo-edit, git-interactive-rebase-tool, rust-cbindgen,
rust-cbindgen-0.24, rust-cbindgen-0.19, sniffglue, tectonic, treefmt,
hex, tokei, vivid, watchexec, rbw, rust-analyzer, rust-cargo-c, rtss,
skim, skim-0.7, svd2rust, swayhide, tealdeer, git-absorb, zoxide, htmlq),
* gnu/packages/sequoia.scm (sequoia-sqv),
* gnu/packages/syndication.scm (newsboat),
* gnu/packages/terminals.scm (alacritty),
* gnu/packages/text-editors.scm (kak-lsp, parinfer-rust),
* gnu/packages/tree-sitter.scm (tree-sitter-cli),
* gnu/packages/video.scm (rav1e),
* gnu/packages/web.scm (monolith, castor)
[arguments]: Enable tests.
2023-10-18 11:36:18 +03:00
Efraim Flashner 163592c843
build: cargo-build-system: Strip enough prefix in package.
* guix/build/cargo-build-system.scm (package): When using the source as
the packaged crate also strip the 'rust-' prefix.
2023-10-18 11:36:16 +03:00
Efraim Flashner fafbad0ce2
build: cargo-build-system: Reset timestamps in crates.
This fixes reproducibility in rust crates from the package phase,
see <https://issues.guix.gnu.org/50015>.

* guix/build/cargo-build-system.scm (package): After running 'cargo
package' on the source unpack the tarball, reset the timestamps and
repack it.
2023-10-18 11:36:16 +03:00
Efraim Flashner c2ac2e3f38
build: cargo-build-system: Check for pregenerated files.
* guix/build/cargo-build-system.scm (check-for-pregenerated-files): New
procedure.
(%standard-phases): Add 'check-for-pregenerated-files phase between
'unpack and 'unpack-rust-crates.
2023-10-18 11:35:40 +03:00
Josselin Poiret dcc5c34504
guix: import: opam: Handle list of licenses.
Fixes <https://issues.guix.gnu.org/issue/66461>.
Reported by Simon Tournier <zimon.toutoune@gmail.com>.

* guix/import/opam.scm (opam->guix-package): Handle lists of licenses.

Signed-off-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-10-17 14:52:06 +02:00
Simon Tournier daaebc6457
scripts: weather: Handle EPIPE errors when displaying help.
* guix/scripts/weather.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:06 +02:00
Simon Tournier 16e53f1687
scripts: upgrade: Handle EPIPE errors when displaying help.
* guix/scripts/upgrade.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:06 +02:00
Simon Tournier a293b1cfa7
scripts: time-machine: Handle EPIPE errors when displaying help.
* guix/scripts/time-machine.scm (%options): Handle EPIPE errors when
displaying help.
2023-10-17 14:52:05 +02:00
Simon Tournier c4aa37fde9
scripts: substitute: Handle EPIPE errors when displaying help.
* guix/scripts/substitute.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:05 +02:00
Simon Tournier 6c5516ab83
scripts: system: Handle EPIPE errors when displaying help.
* guix/scripts/system.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:05 +02:00
Simon Tournier 08b16ebcb3
scripts: style: Handle EPIPE errors when displaying help.
* guix/scripts/style.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:04 +02:00
Simon Tournier 426f52826b
scripts: size: Handle EPIPE errors when displaying help.
* guix/scripts/size.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:04 +02:00
Simon Tournier d56940eb81
scripts: show: Handle EPIPE errors when displaying help.
* guix/scripts/show.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:04 +02:00
Simon Tournier acdbb798d0
scripts: shell: Handle EPIPE errors when displaying help.
* guix/scripts/shell.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:03 +02:00
Simon Tournier 94e0496aa8
scripts: search: Handle EPIPE errors when displaying help.
* guix/scripts/search.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:03 +02:00
Simon Tournier c5a5ccfa54
scripts: repl: Handle EPIPE errors when displaying help.
* guix/scripts/repl.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:03 +02:00
Simon Tournier 028de130d2
scripts: remove: Handle EPIPE errors when displaying help.
* guix/scripts/remove.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:02 +02:00
Simon Tournier ac9b2939d6
scripts: refresh: Handle EPIPE errors when displaying help.
* guix/scripts/refresh.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:02 +02:00
Simon Tournier 0c0bcbdd83
scripts: pull: Handle EPIPE errors when displaying help.
Reported by Mathieu Othacehe <othacehe@gnu.org>.

* guix/scripts/pull.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:02 +02:00
Simon Tournier 3a665d789f
scripts: publish: Handle EPIPE errors when displaying help.
* guix/scripts/publish.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:01 +02:00
Simon Tournier bfc6c54131
scripts: processes: Handle EPIPE errors when displaying help.
* guix/scripts/processes.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:01 +02:00
Simon Tournier 4451982ac4
scripts: package: Handle EPIPE errors when displaying help.
Reported by Mathieu Othacehe <othacehe@gnu.org>.

* guix/scripts/package.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:01 +02:00
Simon Tournier 61a7e16d8d
scripts: pack: Handle EPIPE errors when displaying help.
* guix/scripts/pack.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:52:00 +02:00
Simon Tournier ef8a615861
scripts: offload: Handle EPIPE errors when displaying help.
* guix/scripts/offload.scm (guix-offload): Handle EPIPE errors when displaying
help.
2023-10-17 14:52:00 +02:00
Simon Tournier 55c3776023
scripts: locate: Handle EPIPE errors when displaying help.
* guix/scripts/locate.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:59 +02:00
Simon Tournier 078107289a
scripts: lint: Handle EPIPE errors when displaying help.
* guix/scripts/lint.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:59 +02:00
Simon Tournier a5d9042663
scripts: install: Handle EPIPE errors when displaying help.
* guix/scripts/install.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:59 +02:00
Simon Tournier 79b6eef750
scripts: import: Handle EPIPE errors when displaying help.
* guix/scripts/import.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:58 +02:00
Simon Tournier f7c274c403
scripts: home: Handle EPIPE errors when displaying help.
* guix/scripts/home.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:58 +02:00
Simon Tournier 7d36333145
scripts: hash: Handle EPIPE errors when displaying help.
* guix/scripts/hash.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:58 +02:00
Simon Tournier ba8a43f220
scripts: graph: Handle EPIPE errors when displaying help.
* guix/scripts/graph.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:57 +02:00
Simon Tournier cba0fa6f4f
scripts: git: Handle EPIPE errors when displaying help.
* guix/scripts/git.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:57 +02:00
Simon Tournier 330540b638
scripts: gc: Handle EPIPE errors when displaying help.
* guix/scripts/gc.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:57 +02:00
Simon Tournier 8ed377978e
scripts: edit: Handle EPIPE errors when displaying help.
* guix/scripts/edit.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:56 +02:00
Simon Tournier 25331ae62b
scripts: download: Handle EPIPE errors when displaying help.
* guix/scripts/download.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:56 +02:00
Simon Tournier 6c6071faf9
scripts: discover: Handle EPIPE errors when displaying help.
* guix/scripts/discover.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:56 +02:00
Simon Tournier a53e5fb121
scripts: describe: Handle EPIPE errors when displaying help.
* guix/scripts/describe.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:55 +02:00
Simon Tournier c150267648
scripts: deploy: Handle EPIPE errors when displaying help.
* guix/scripts/deploy.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:55 +02:00
Simon Tournier fb231e09cb
scripts: copy: Handle EPIPE errors when displaying help.
* guix/scripts/copy.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:55 +02:00
Simon Tournier f814d33cbd
scripts: container: Handle EPIPE errors when displaying help.
* guix/scripts/container.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:54 +02:00
Simon Tournier 2ac8e95dba
scripts: challenge: Handle EPIPE errors when displaying help.
* guix/scripts/challenge.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:54 +02:00
Simon Tournier de63efc802
scripts: build: Handle EPIPE errors when displaying help.
* guix/scripts/build.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17 14:51:54 +02:00
Simon Tournier b53742def3
scripts: archive: Handle EPIPE errors when displaying help.
* guix/scripts/archive.scm (%options): Handle EPIPE errors when displaying
help.
2023-10-17 14:51:53 +02:00
Simon Tournier b4d1eb53c0
ui: Handle EPIPE errors when displaying Guix version.
Fixes <https://issues.guix.gnu.org/66254>.
Reported by Clément Lassieur <clement@lassieur.org>.

* guix/ui.scm (show-version-and-exit): Handle EPIPE errors when displaying
version.
2023-10-17 14:51:53 +02:00
Sören Tempel 435090fa3f
pack: Allow setting a custom image tag for Docker images
Previously, the image repository name was automatically computed from
the packages in the manifest without allowing the user to set a custom
one. As such, changing the packages in the manifest would result in a
new image name. Thereby requiring updating documentation et cetera when
using `docker load` directory on the resulting image.

Inspired by `docker build -t`, this commit adds a new Docker-specific
option to `guix pack` which allows setting a custom repository name for
the resulting image. If this option is not specified, pack falls back
to computing the name from the manifest. Therefore, this change is
entirely backwards compatible.

Documentation has been added with: 373ec2cf8c.

* guix/scripts/pack.scm (guix-pack): Add --image-tag option.
(%docker-format-options): New constant.
(show-docker-format-options): New procedure.
(show-docker-format-options/detailed): New procedure.
(docker-image): Allow setting a custom
repository name for the created docker image via extra-options.

Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-10-16 09:08:13 +02:00
Ludovic Courtès d0fed2f4df
locate: Do not return the system database when it is too old.
Fixes a bug whereby ‘guix locate’ would pick the system database, then
decide it’s too old, try to update it, and fail because it’s not
writable by unprivileged users.

Fixes <https://issues.guix.gnu.org/66612>.

* guix/scripts/locate.scm (file-age): New procedure.
(suitable-database): Add ‘age-update-threshold’ parameter and honor it.
(guix-locate): Remove ‘file-age’.  Pass ‘age-update-threshold’ to the
‘database’ option.

Reported-by: Matt Wette <matt.wette@gmail.com>
2023-10-18 18:21:04 +02:00
Ludovic Courtès 75bdf8e06a
shell: Take grafting into account when caching.
Fixes <https://issues.guix.gnu.org/64856>.

* guix/scripts/shell.scm (profile-file-cache-key)
(profile-spec-cache-key): Take (%graft?) into account.

Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-10-12 18:53:07 +02:00
Ricardo Wurmus 9d4339afb1
build-system/minify: Use esbuild.
* guix/build-system/minify.scm (default-uglify-js): Replace this procedure...
(default-esbuild): ...with this new procedure.
(lower): Use it, and add "esbuild" to build inputs.
* guix/build/minify-build-system.scm (minify): Invoke esbuild instead of
setting up a pipe to uglifyjs.
* gnu/packages/cran.scm (r-shiny)[native-inputs]: Replace node-uglify-js with
esbuild.
* gnu/packages/statistics.scm (r-dt)[native-inputs]: Same.
2023-10-06 16:37:16 +02:00
Ludovic Courtès 762fdbdef5
perform-download: Set PATH before invoking ‘git’.
Fixes <https://issues.guix.gnu.org/66305>.
Reported by Guillaume Le Vaillant <glv@posteo.net>.

* guix/scripts/perform-download.scm (perform-git-download): Add call to
‘setenv’.
2023-10-05 23:14:53 +02:00
Ricardo Wurmus 3fba8cd274
refresh: Fix sorting of updates by file and line number.
* guix/scripts/refresh.scm (guix-refresh): Add cascade-sort procedure and use
it to sort specs by package location.
2023-10-05 15:16:26 +02:00
Maxim Cournoyer 2d8aa104aa
search-paths: Add GCC search paths.
* guix/search-paths.scm ($C_INCLUDE_PATH, $CPLUS_INCLUDE_PATH)
($LIBRARY_PATH, %gcc-search-paths): New variables.
2023-10-04 23:30:41 -04:00
Jean-Pierre De Jesus DIAZ 3ba8f3f0d8
guix: meson-configuration: Fix boolean assigment.
* guix/build/meson-configuration.scm (write-assigment): Print true for
  #t and false for #f.  Previously it was inverting the values.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-10-04 14:58:42 +02:00
Nikolaos Chatzikonstantinou c6eed13c87
archive: Fix ‘--version’ typo.
* guix/scripts/archive.scm (%options): Replace 'build' by 'archive'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-09-28 11:44:09 +02:00
Tobias Geerinckx-Rice 974b04ab80
read-print: Be more mindful of horizontal space in packages.
Perhaps due to their staged nature, packages tend to be ‘lopsided’: deeply
nested, with the most elaborate code on the {build,right-hand-,in}side, in
snippets and phases.

When we indent outer forms too eagerly, we can easily run short on
columns by the time we get to the build code, reducing readability.  A
few strategically-placed newlines early on can make a big difference.

* guix/read-print.scm (%newline-forms): Add a newline after opening a
<package> source field or an argument list.  Compensate by removing the
base32 special case, which is now unnecessary.
2023-09-24 02:00:00 +02:00
Ludovic Courtès 13b0cf85eb
git-download: Use “builtin:git-download” when available.
Fixes <https://issues.guix.gnu.org/63331>.

Longer-term this will remove Git from the derivation graph when its sole
use is to perform a checkout for a fixed-output derivation, thereby
breaking dependency cycles that can arise in these situations.

* guix/git-download.scm (git-fetch): Rename to…
(git-fetch/in-band): … this.  Deal with GIT or GUILE being #f.
(git-fetch/built-in, built-in-builders*, git-fetch): New procedures.
* tests/builders.scm ("git-fetch, file URI"): New test.
2023-09-26 17:36:58 +02:00
Ludovic Courtès c4a1d69a69
perform-download: Use the ‘git’ command captured at configure time.
* guix/scripts/perform-download.scm (perform-git-download): Pass #:git-command
to ‘git-fetch-with-fallback’.
2023-09-26 17:36:58 +02:00
Ludovic Courtès f651a35969
build: Add dependency on Git.
* configure.ac: Check for ‘git’ and substitute ‘GIT’.
* guix/config.scm.in (%git): New variable.
* guix/self.scm (compiled-guix): Define ‘git’ and pass it to
‘make-config.scm’.
(make-config.scm): Add #:git; emit a ‘%git’ variable.
* doc/guix.texi (Requirements): Add it.
2023-09-26 17:36:58 +02:00
Ludovic Courtès 95f2123135
daemon: Add “git-download” built-in builder.
The new builder makes it possible to break cycles that occurs when the
fixed-output derivation for the source of a dependency of ‘git’ would
itself depend on ‘git’.

* guix/scripts/perform-download.scm (perform-git-download): New
procedure.
(perform-download): Move fixed-output derivation check to…
(guix-perform-download): … here.  Invoke ‘perform-download’ or
‘perform-git-download’ depending on what ‘derivation-builder’ returns.
* nix/libstore/builtins.cc (builtins): Add “git-download”.
* tests/derivations.scm ("built-in-builders"): Update.
("'git-download' built-in builder")
("'git-download' built-in builder, invalid hash")
("'git-download' built-in builder, invalid commit")
("'git-download' built-in builder, not found"): New tests.
2023-09-26 17:36:58 +02:00
Ludovic Courtès 9d0e2002a5
perform-download: Remove unused one-argument clause.
Code in ‘builtins.cc’ only ever invokes ‘guix perform-download’ with two
arguments.

* guix/scripts/perform-download.scm (guix-perform-download): Remove
unused one-argument clause.
(perform-download): Make ‘output’ parameter mandatory; remove ‘output*’
variable.
2023-09-26 17:36:58 +02:00
Ludovic Courtès c7ed1e0160
git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment variable.
* guix/git-download.scm (git-fetch): Honor ‘%download-fallback-test’.
2023-09-26 17:36:58 +02:00
Ludovic Courtès 811b249397
git-download: Move fallback code to (guix build git).
* guix/build/git.scm (git-fetch-with-fallback): New procedure, with code
taken from…
* guix/git-download.scm (git-fetch): … here.
[modules]: Remove modules that are no longer directly used in ‘build’.
[build]: Use ‘git-fetch-with-fallback’.
2023-09-26 17:36:57 +02:00
Simon Tournier 94f3831e5b
git: Restore 'false-if-git-not-found' in 'reference-available?'.
* guix/git/scm (reference-available?): Add 'false-if-git-not-found' for the
case 'commit.
2023-09-25 12:00:18 +02:00
Liliana Marie Prikler cdbd81ce14
Merge branch 'master' into emacs-team 2023-09-22 23:54:34 +02:00
Simon Tournier 6d33c1f806
git: Avoid touching the network unless needed in 'reference-available?'.
Follow-up of 756e336fa0 fixing the issue.

* guix/git/scm (reference-available?): Address case by case to determine
whether the reference exists in the local Git checkout.
2023-09-22 14:42:56 +02:00
Mathieu Othacehe e5ed1712da
image: Introduce the mbr-hybrid-raw image type.
Until 209204e23b and
d57cab7641, the default image type used by "guix
system image" was an MBR image with an ESP partition.

Having both an MBR image and an ESP partition is handy because the image will
boot on most x86 based systems using legacy BIOS and/or UEFI.

We now have a distinction between MBR images and EFI images. Introduce a new
MBR hybrid image type and default to it to restore the default behaviour.

This also fixes the images section of (gnu ci) that was trying to install a
BIOS bootloader on an EFI, GPT image and failing to do so.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-09-20 09:38:36 +02:00
Janneke Nieuwenhuizen 15c5f1a2c2
self: Compile guix-packages-base in chunks of 10 files.
This fixes or greatly increases the chances for `guix pull' to succeed on the
Hurd, see <https://issues.guix.gnu.org/65456>.

* guix/self.scm (compiled-modules)[process-directory]: Move hardcoded size to
keyword parameter #:size.  Set it to 10 when compiling "guix-packages-base".
2023-09-19 11:01:14 +02:00
Janneke Nieuwenhuizen 658de25e99
self: Build directories in chunks of max 25 files at a time.
This increases the chances of a successful `guix pull' on the Hurd,
see <https://issues.guix.gnu.org/65456>.

* guix/self.scm (compiled-modules)[process-directory]: Split building of
directories into chunks of max 25 files.  Also call gc.
2023-09-18 06:46:03 +02:00
Jean-Pierre De Jesus DIAZ 19b6173708
transformations: tuned-package: Use target on cross-compile.
* guix/transformations.scm (tuned-package): Use either bag-target if
  available or bag-system to select the CPU architecture of the package
  that is going to be tuned.  This enables the tuning of cross-compiled
  packages.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-09-17 15:31:03 +02:00
Liliana Marie Prikler 94ca5b4357
Merge branch 'master' into emacs-team 2023-09-09 12:22:14 +02:00
Janneke Nieuwenhuizen 1ef4974be9
guix: shell: Don't whitelist / by typo in `shell-authorized-directories'.
Fixes <https://issues.guix.gnu.org/65832>.

* guix/scripts/shell.scm (authorized-shell-directory?): After warning,
continue LOOP to return valid query result for DIRECTORY.
2023-09-08 22:51:25 +02:00
Maxime Devos 96eda590e1
lint: Check that (cc-for-target) and friends are used.
"CC=gcc" is almost always incorrect; people often just don't
notice the incorrectness because they are compiling natively.
For an exception, see tzdata.

"guix style" partially made things worse, so I partially ignored it.

* guix/lint.scm (check-compiler-for-target): New linter.
* tests/lint.scm
("compiler-for-target: unconditional CC=gcc is unacceptable")
("compiler-for-target: looks through G-expressions")
("compiler-for-target: (cc-for-target) is acceptable")
("compiler-for-target: CC=gcc is acceptable when target=#false"):
Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-09-08 19:12:15 +02:00
Hilton Chain 4a00fa9bea
build: emacs-utils: Adjust ‘emacs-compile-directory’ for Emacs 29.
* guix/build/emacs-utils.scm (emacs-compile-directory): After native
compilation, write the bytecode file with ‘comp-write-bytecode-file’.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-09-07 20:25:06 +02:00
Simon Tournier d552c2508f
guix: packages: Support package/inherit by package-field-location.
Fixes <https://issues.guix.gnu.org/65236>.

* guix/packages.scm (package-field-location): Add package/inherit case.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-09-06 16:41:06 -04:00
Maxim Cournoyer 87dab3e36b
gnu-maintenance: Do not error when there are no candidates.
Fixes <https://issues.guix.gnu.org/65773>.

* guix/gnu-maintenance.scm (rewrite-url): Do not error when there are no
candidates.  This may well be possible, depending on the site.
2023-09-06 01:03:27 -04:00
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