summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Expand)Author
2023-12-14build-system/zig: Do not import (guix build syscalls)....* guix/build-system/zig.scm (%zig-build-system-modules): Remove (guix build syscalls), which is unused. Change-Id: Ie91c46c68787e0a8ffa3cbde2c5fd2294b82ed15 Ludovic Courtès
2023-12-13syscalls: Define riscv64 syscall ID for clone....* guix/build/syscalls.scm (clone): Add an entry for riscv64. This allows the use of --container on riscv64. Change-Id: I12b3cb5e2aa248266d006b6e456082f4ddc70e62 Signed-off-by: Ludovic Courtès <ludo@gnu.org> MarcoFalke
2023-12-13Merge branch 'rust-team'...Change-Id: Iee33d7b9067d2180fd4b2e28d81716a251a53a01 Efraim Flashner
2023-12-11weather: Report unauthorized substitute servers....The goal is to make it easier to diagnose substitute misconfiguration (where we’re passing a substitute URL whose corresponding key is not authorized). Suggested by Emmanuel Agullo. * guix/scripts/weather.scm (check-narinfo-authorization): New procedure. (report-server-coverage): Use it. * doc/guix.texi (Invoking guix weather): Document it. (Getting Substitutes from Other Servers): Add “Troubleshooting” frame. Change-Id: I0a049c39eefb10d6a06634c8b16aa86902769791 Ludovic Courtès
2023-12-11weather: Use the same substitute URLs as guix-daemon....* guix/scripts/weather.scm (%default-options): Remove ‘substitute-urls’. (guix-weather): Call ‘substitute-urls’ when OPTS doesn’t have it. Warn when ‘substitute-urls’ returns #f. * doc/guix.texi (Invoking guix weather): Adjust accordingly. Change-Id: I3e9100074f2ad559e5c408660db70430d64f2bef Ludovic Courtès
2023-12-11challenge: Use the same substitute URLs as guix-daemon....* guix/scripts/challenge.scm (%default-options): Remove ‘substitute-urls’. (guix-challenge): Call ‘substitute-urls’ when OPTS doesn’t have it. Warn when ‘substitute-urls’ returns #f. Change-Id: I49be0e89404c1889970a3430967fbb3498d35d99 Ludovic Courtès
2023-12-11daemon: Implement ‘substitute-urls’ RPC....* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump. (WorkerOp): Add ‘wopSubstituteURLs’. * nix/nix-daemon/nix-daemon.cc (performOp): Implement it. * guix/store.scm (%protocol-version): Bump. (operation-id): Add ‘substitute-urls’. (substitute-urls): New procedure. * tests/store.scm ("substitute-urls, default") ("substitute-urls, client-specified URLs") ("substitute-urls, disabled"): New tests. Change-Id: I2c0119500c3a1eecfa5ebf32463ffb0f173161de Ludovic Courtès
2023-12-10Merge remote-tracking branch 'origin/master' into rust-team...Change-Id: Ic45f7071abd6a02c2ccad411500e5103c8272ffb Efraim Flashner
2023-11-28build: cargo: Use correct config file for cargo config....* guix/build/cargo-build-system.scm (configure): Use .cargo/config as the config file. Add a note. Change-Id: Ice006c11184d4c8e1bdb765c3998b06ad299e55b Efraim Flashner
2023-11-28build/cargo-build-system: Enable cross-compiling....* guix/build-system/cargo.scm (default-rust): Accept an argument. (default-rust-sysroot, cargo-cross-build): New procedures. (lower): Accept a rust-sysroot. [private-kewords]: Add rust-sysroot. Remove target if cross-compiling. [bag]: Allow cross-compiling. In host-inputs only have inputs when cross-compiling, move crate sources to here, remove standard-packages. In build-inputs add the inputs when not cross-compiling, add the standard-cross-packages when cross-compiling, add the standard-packages to here. Add target-inputs with the standard-cross-packages and rust-sysroot when cross-compiling. * guix/build/cargo-build-system.scm (configure): Accept target argument. When cross-compiling set some environment variables. Adjust the .config/cargo.toml to have configure options for cross-compiling. Change-Id: I388d1e1f48943e45ff01f55af8efc0746f383b4a Efraim Flashner
2023-11-28build: cargo-build-system: Pack crates reproducibly....This fixes reproducibility in rust crates from the package phase, again, see <https://issues.guix.gnu.org/50015>. Reported by: Christopher Baines (in person). * guix/build/cargo-build-system.scm (package): When repacking the crate tarball use standard reproducibility flags. Change-Id: Ifb1440a023226bf0718e99ce9f95ef981e510cbc Efraim Flashner
2023-12-06shell: ‘--development’ honors ‘--system’....Fixes a bug whereby ‘package->development-manifest’ would run with the wrong system in mind, leading to errors like this: $ guix shell -s i586-gnu -D shepherd --no-grafts guix shell: error: package linux-libre-headers@5.15.49 does not support i586-gnu * guix/scripts/environment.scm (options/resolve-packages): Define ‘system’ and pass it to ‘package->development-manifest’.’ * tests/guix-shell.sh: Test it. Change-Id: I95c471c1918913ab80dec7d3ca64fe38583cce78 Ludovic Courtès
2023-12-04monad-repl: Add REPL commands to inspect package arguments....* guix/monad-repl.scm (keyword-argument-value, package-argument-command): New procedures. (phases, configure-flags, make-flags): New REPL commands. * doc/guix.texi (package Reference): Link to “Using Guix Interactively”. (Defining Package Variants): Add “Tips” quotation. (Build Phases): Add “Tip” quotation. (Using Guix Interactively): Document the new REPL commands. Change-Id: I7049c1d8aa9241e07d7c921aa396e578a1b4ef16 Ludovic Courtès
2023-12-04substitute: Do not exit when failing to find a nar....Fixes <https://issues.guix.gnu.org/67575>. * guix/scripts/substitute.scm (process-substitution/fallback): Use ‘report-error’ instead of ‘leave’. Write status line to PORT. * tests/substitute.scm ("substitute, narinfo is available but nar is missing"): Adjust accordingly. Change-Id: Ic7297dbd563c007111ec2167c8d52505a07d4822 Ludovic Courtès
2023-12-04Revert "build/go: Don't use set!"...This causes too many rebuilds. This reverts commit 0a4b6fd51a2a4f87cbd85019db07984fd37096d7. Efraim Flashner
2023-12-04build/go: Don't use set!...This causes build failures on powerpc-linux. * guix/build/go-build-system.scm (unpack): When the unpack-path is unset use the import-path but don't redefine the unpack-path. Change-Id: I2b5a36eb738abb14307941d388038139dbaf2bdf Efraim Flashner
2023-12-03packages: Honor target system for the inputs to ‘patch-and-repack’....* guix/packages.scm (%standard-patch-inputs): Add ‘system’ parameter. Parameterize ‘%current-system’. (patch-and-repack): Pass SYSTEM to ‘%standard-patch-inputs’. Change-Id: Ic8ad93303332fd1eefba0a93a314f99db782eda6 Ludovic Courtès
2023-12-03grafts: Use the right locale package....This is a followup to b0715d7cd2a74bc231751f8afc9dffb2047501ac, fixing builds of grafts on i586-gnu. * guix/grafts.scm (graft-derivation/shallow)[glibc-locales]: Choose symbol as a function of ‘target-hurd?’. Change-Id: I05e50c0ed74a64986a0cea9c6302d1b5592b898d Ludovic Courtès
2023-12-03guix: import: Fix parsing Cabal files that import many stanzas...* guix/import/cabal.scm (eval-cabal)[eval]: Split imports to a normalized list before mapping over it. * tests/hackage.scm: Test it. Change-Id: I39ece019251b6a23a937c8562d2d4a545a6bc7df Signed-off-by: Lars-Dominik Braun <lars@6xq.net> Saku Laesvuori
2023-12-03guix: import: Parse cabal layout blocks correctly...Cabal consideres lines to be part of a layout block if they are indented at least one space more than the field line the block belongs to. Previously Guix considered lines to be a part of the block if they were indented at least as much as the first line in it. This also makes a workaround that enabled if statements to have multiple elses redundant and removes it. Fixes: https://issues.guix.gnu.org/35743 * guix/import/cabal.scm (current-indentation*): Renamed from current-indentation. (previous-indentation, current-indentation): New variables. (make-cabal-parser): Remove outdated comment. [open]: Use previous-indentation + 1 instead of current-indentation. [elif-else]: Split to elif and else to allow only one ELSE in an if statement. (read-cabal)[parameterize]: Use current-indentation* and previous-indentation. * tests/hackage.scm (hackage->guix-package test mixed layout): Expect to pass. Change-Id: I3a1495b1588a022fabbfe8dad9f3231e578af4f3 Signed-off-by: Lars-Dominik Braun <lars@6xq.net> Saku Laesvuori
2023-12-03guix: import: stackage: Fix crash on recursive import...* guix/import/stackage.scm (lts-package-version): Call stackage-package-version only when the package is found. Change-Id: Ic8d7c1b7a42a9c1a6cbba567e148706507a53ee3 Signed-off-by: Lars-Dominik Braun <lars@6xq.net> Saku Laesvuori
2023-12-03guix: import: hackage: Fix crash on recursive import...Fixes: https://issues.guix.gnu.org/64734 * guix/import/hackage.scm (hackage-module->sexp): Return package names instead of <upstream-input> records. Change-Id: Id428a8b903b4b59d44205ca366324a0a69a4e05b Signed-off-by: Lars-Dominik Braun <lars@6xq.net> Saku Laesvuori
2023-12-03transformations: Add support for zig....* guix/transformations.scm (tuning-compiler): Add support for zig. Change-Id: I40bd28071c97c0dd0a907c704072b52b26d2de28 Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Ekaitz Zarraga
2023-12-02gnu: Use ‘libc-utf8-locales-for-target’....* guix/packages.scm (%standard-patch-inputs): Use ‘libc-utf8-locales-for-target’ instead of ‘glibc-utf8-locales’. * guix/self.scm (%packages): Likewise. * gnu/home/services/ssh.scm (file-join): Likewise * gnu/installer.scm (build-compiled-file): Likewise. * gnu/packages/chromium.scm (ungoogled-chromium/wayland): Likewise. * gnu/packages/gnome.scm (libgweather4, tracker): Likewise. * gnu/packages/javascript.scm (js-mathjax): Likewise. * gnu/packages/package-management.scm (guix, flatpak): Likewise. * gnu/packages/raspberry-pi.scm (raspi-arm64-chainloader): Likewise. * gnu/packages/suckless.scm (svkbd): Likewise. * gnu/services.scm (cleanup-gexp): Likewise. * gnu/services/base.scm (guix-publish-shepherd-service): Likewise. * gnu/services/guix.scm (guix-build-coordinator-shepherd-services) (guix-build-coordinator-agent-shepherd-services): Likewise. * gnu/services/guix.scm (guix-build-coordinator-queue-builds-shepherd-services): (guix-data-service-shepherd-services) (nar-herder-shepherd-services) (bffe-shepherd-services): Likewise. * gnu/services/web.scm (anonip-shepherd-service) (mumi-shepherd-services): Likewise. * gnu/system/image.scm (system-disk-image, system-iso9660-image) (system-docker-image, system-tarball-image): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * guix/profiles.scm (info-dir-file): Likewise. (ca-certificate-bundle, profile-derivation): Likewise. * guix/scripts/pack.scm (store-database, set-utf8-locale): Likewise. * tests/pack.scm: Likewise. * tests/profiles.scm ("profile-derivation, cross-compilation"): Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Co-authored-by: Christopher Baines <mail@cbaines.net> Change-Id: I24239f427bcc930c29d2ba5d00dc615960a6c374 Janneke Nieuwenhuizen
2023-11-26locate: Gracefully handle busy-database error conditions....* guix/scripts/locate.scm (SQLITE_BUSY): New variable. (call-with-database): Catch 'sqlite-error and call ‘leave’ upon SQLITE_BUSY. Change-Id: Iebe76c75d45e70317bd18d2c176dcdeaf9d6964c Co-authored-by: Ludovic Courtès <ludo@gnu.org> Maciej Kalandyk
2023-11-26build-system/vim: Add missing keywords....* guix/build-system/vim.scm (vim-build): Add missing build-system flags. Change-Id: Ie0094bb0579987e8432750f883eb56bae8ccd845 Efraim Flashner
2023-11-25build-system/meson: Add #:substitutable? argument to build system....This implemented the same as in gnu-build-system. The gexp->derivation calls did not need to be modified because they already passed #:substitutable?, which did not cause an error due to the procedure exported by the (guix store) module with the same name. * guix/build-system/meson.scm (meson-build, meson-cross-build): Add #:substitutable? argument Change-Id: I2d56c8130f785a2d6af456ef9f9bfc1b10dc2a50 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Skyler Ferris
2023-11-25build-system/guile: Add #:substitutable? argument to build system....This is implemented the same as in gnu-build-system. * guix/build-system/guile.scm (guile-build, guile-cross-build): Add #:substitutable? argument Change-Id: I04babb81ff1f322833f7ff22cd7580c048b26102 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Skyler Ferris
2023-11-25tests: Import (guix build syscalls) when (guix build store-copy) is used....Fixes a test failure introduced in 189525412e3d803f3f77e15ec4a62aaa57f65a2d. * guix/progress.scm: Autoload (guix build syscalls). * tests/gexp.scm ("gexp->derivation, store copy"): Add (guix build syscalls) to the list of imported modules. Use ‘with-imported-modules’ rather than #:modules. Change-Id: I8d3fe90f564ef4b1a340f34cee6c08a741f7b836 Ludovic Courtès
2023-11-25syscalls: Add fallback case for ‘terminal-string-width’....This makes ‘terminal-string-width’ synonymous with ‘string-length’ when running one a statically-linked Guile, as is the case in some unit tests, instead of throwing ENOSYS. * guix/build/syscalls.scm (terminal-string-width): Use ‘dynamic-func’ and ‘pointer->procedure’ instead of ‘syscall->procedure’. Return ‘string-length’ when one of the ‘dynamic-func’ calls fails. Change-Id: Icf55c9e7c34b46fac91b665fb4a2ecb02160f22e Ludovic Courtès
2023-11-22shell: 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 Ludovic Courtès
2023-11-22shell: 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 Felix Lechner
2023-11-22git: 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. Ludovic Courtès
2023-11-22read-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 Ludovic Courtès
2023-11-22style: ‘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 Ludovic Courtès
2023-11-20build-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 Christopher Baines
2023-11-15build-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> Tomas Volf
2023-11-15locate: 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 Ludovic Courtès
2023-12-11guix: 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 Efraim Flashner
2023-12-11guix: 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> Jean-Pierre De Jesus DIAZ
2023-12-11guix: 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> Jean-Pierre De Jesus DIAZ
2023-12-11guix: 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> Jean-Pierre De Jesus DIAZ
2023-12-11guix: 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> Jean-Pierre De Jesus DIAZ
2023-12-11guix: 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> Jean-Pierre De Jesus DIAZ
2023-11-11guix: 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 Julien Lepiller
2023-11-11guix: syscalls: Add terminal-string-width....* guix/build/syscalls.scm (terminal-width): New procedure. * tests/syscalls.scm: Add tests. Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3 Julien Lepiller
2023-11-11build: 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> Tristan Cottam
2023-11-09guix: 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 Julien Lepiller
2023-11-08build-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> Jonathan Scoresby
2023-11-07git-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> Maxim Cournoyer