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