summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Expand)Author
2023-02-19guix: Show better progress bars....Style provides information on the characters to use before and after the progress bar content (`[` and `]` for the ascii style), as well as the character for filled step (`#` for ascii style). When supported, it provides intermediate steps. This is used for unicode style, to show better precision. * guix/progress.scm (<progress-bar-style>): New record type. (ascii-bar-style, unicode-bar-style): New variables. (progress-bar): Draw progress depending on style. When supported, use unicode style. Fall back to ascii style. Julien Lepiller
2023-02-18import/cran: Remove directory-needs-zlib? in favor of needed-libraries-in-dir......* guix/import/cran.scm (directory-needs-zlib?): Remove procedure. (source-dir->dependencies): Use needed-libraries-in-directory instead of directory-needs-zlib?. Ricardo Wurmus
2023-02-18import/cran: Add generic way to detect needed libraries....* guix/import/cran.scm (needed-libraries-in-directory): New procedure. (libraries-pattern, packages-for-matches): New variables. Ricardo Wurmus
2023-02-18import/cran: Process all vignette builders....* guix/import/cran.scm (needs-knitr?): Remove procedure. (vignette-builders): New procedure. (description->package): Use vignette-builders instead of needs-knitr?. Ricardo Wurmus
2023-02-18import/cran: Add name mapping for libjpeg....* guix/import/cran.scm (transform-sysname): Add mapping from libjpeg to libjpeg-turbo. Ricardo Wurmus
2023-02-18import/cran: Add directory-needs-esbuild?....* guix/import/cran.scm (directory-needs-esbuild?): New procedure. (source-dir->dependencies): Use it. Ricardo Wurmus
2023-02-12licenses: Update NPSL (nmap licence)....The previous URL does not resolve. The new URL contains an updated licence text (version 0.95 at time of this commit) that is strictly less worse than previous versions, and applies retroactively to older nmaps: “Versions of Nmap released under previous versions of the NPSL may also be used under the NPSL 0.95 terms.” -- <https://nmap.org/changelog> * guix/licenses.scm (nmap): Update. Tobias Geerinckx-Rice
2023-02-12build-system: Add tree-sitter-build-system....* guix/build-system/tree-sitter.scm: New module. * guix/build/tree-sitter-build-system.scm: Likewise. * Makefile.am (MODULES): Add them. * doc/guix.texi: Document it. Signed-off-by: Andrew Tropin <andrew@trop.in> Pierre Langlois
2023-02-12syscalls: 'with-file-lock' removes lock file upon exit....Fixes <https://issues.guix.gnu.org/57501>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/build/syscalls.scm (call-with-file-lock) (call-with-file-lock/no-wait): Add call to 'delete-file' in unwind handler. Ludovic Courtès
2023-02-11download: Add bordeaux.guix.gnu.org as a content addressed mirror....bordeaux.guix.gnu.org now provides access to some files by hash. This is done through the nar-herder finding a nar produced by a fixed output derivation for the requested content, and then providing the content stored inside that nar. I've put this new entry at the start of the list, as I think it's more likely to have content than the others. Because bordeaux.guix.gnu.org stores nars indefinitely, my suspicion is that it's going to be able to fulfil more requests than ci.guix.gnu.org, which relies on the file requested being in the store (so the now frequent garbage collection is going to limit the files available). * guix/download.scm (%content-addressed-mirrors): Add bordeaux.guix.gnu.org. Signed-off-by: Christopher Baines <mail@cbaines.net> Christopher Baines
2023-02-11status: Print a hint when a 'package-cache' hook fails to build....* guix/channels.scm (package-cache-file): Add 'channels' to the #:properties list. * guix/status.scm (print-build-event): Upon failure, display a hint when the derivation is a 'package-cache' hook. Ludovic Courtès
2023-02-11utils: Add target-little-endian?....* guix/utils.scm (target-little-endian?): New function. * guix/build-system/meson.scm (make-machine-alist): Use it. * gnu/packages/chez.scm (nix-system->pbarch-machine-type): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Philip McGrath
2023-02-03build-system: Always pass #:graft? #f to 'gexp->derivation'....Fixes <https://issues.guix.gnu.org/60947>. Fixes a bug whereby packages referred via 'ungexp' in package arguments would be "double-grafted": 'gexp->derivation' would first replace those references by references to the grafted package, only to repeat the grafting process on the result. Build systems such as 'gnu', 'cmake', and 'pyproject' were already doing this. Only the rest of them is affected. * guix/build-system/cargo.scm (cargo-build): Pass #:graft? #f to 'gexp->derivation'. * guix/build-system/copy.scm (copy-build): Likewise. * guix/build-system/dune.scm (dune-build): Likewise. * guix/build-system/font.scm (font-build): Likewise. * guix/build-system/guile.scm (guile-build): Likewise. (guile-cross-build): Likewise. * guix/build-system/ocaml.scm (ocaml-build): Likewise. * guix/build-system/ruby.scm (ruby-build): Likewise. * guix/build-system/scons.scm (scons-build): Likewise. * guix/build-system/texlive.scm (texlive-build): Likewise. * guix/build-system/waf.scm (waf-build): Likewise. Ludovic Courtès
2023-01-30container: Correctly report exit status....* gnu/build/linux-container.scm (container-excursion): Return the raw status value. * tests/containers.scm ("container-excursion, same namespaces"): Add 'status:exit-val' call. * guix/scripts/container/exec.scm (guix-container-exec): Correctly handle the different cases. Ludovic Courtès
2023-01-29build-system: copy: Add substitutable keyword....* guix/build-system/copy.scm (copy-build): Add substitutable keyword. Jonathan Brielmaier
2023-01-22download: Remove dead SourceForge mirrors....* guix/download.scm (%mirrors): Remove dl.sourceforge.net subdomains that no longer resolve. Tobias Geerinckx-Rice
2023-01-26inferior: Use 'spawn' on Guile 3.0.9+....* guix/inferior.scm (open-bidirectional-pipe): When 'spawn' is defined, use it instead of 'primitive-fork'. Ludovic Courtès
2023-01-25ui: Add "error-reporting wrapper" for 'mkdir'....* guix/ui.scm <top level>: Change 'mkdir' to use an error-reporting wrapper. Ludovic Courtès
2023-01-23channels: 'channel->code' emits 'channel' field only when necessary....* guix/channels.scm (channel->code): Emit 'commit' field only when it is true. Ludovic Courtès
2023-01-23import: opam: Do not crash when description is missing....Previous 'guix import opam coccinelle' would crash due to the lack of a description. * guix/import/opam.scm (opam->guix-package): Call 'beautify-description' only when "description" metadata is available. Ludovic Courtès
2023-01-18platforms: Raise an exception when no suitable platform is found....This was motivated by #60786, which produced a cryptic, hard to understand backtrace. Given the following reproducer: (use-modules (guix packages) (gnu packages cross-base)) (define linux-libre-headers-cross-mips64el-linux-gnuabi64 (cross-kernel-headers "mips64el-linux-gnuabi64")) (package-arguments linux-libre-headers-cross-mips64el-linux-gnuabi64) Before this change: ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f After this change: ice-9/boot-9.scm:1685:16: In procedure raise-exception: ERROR: 1. &platform-not-found-error: "mips64el-linux-gnuabi64" * guix/platform.scm (&platform-not-found-error): New condition. (platform-not-found-error?): New predicate. (false-if-platform-not-found): New syntax. (lookup-platform-by-system): Raise an exception when no platform is found. Update documentation. (lookup-platform-by-target): Likewise. (lookup-platform-by-target-or-system): Likewise, and guard lookup calls with false-if-platform-not-found. * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Handle lookup-platform-by-system call to preserve existing behavior. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer
2023-01-17debug-link: Protect against dangling symlinks....Fixes <https://issues.guix.gnu.org/60584>. Reported by Greg Hogan <code@greghogan.com> and Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr>. * guix/build/debug-link.scm (find-elf-files): Wrap 'elf-file?' call in 'catch'. Ludovic Courtès
2023-01-17build-system/meson: Add mips64el cross compilation support....* guix/build-system/meson.scm (make-machine-alist): Add it. Mathieu Othacehe
2023-01-16scripts: repl: Add -i, --interactive flag....* guix/scripts/repl.scm (%options): Add -i, --interactive flag. (guix-repl): Honor -i, --interactive flag. * doc/guix.texi (Invoking guix repl): Add documentation for -i, --interactive. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Antero Mejr
2023-01-16scripts: repl: Add --list-types flag....* guix/scripts/repl.scm (%options): Add --list-types. * doc/guix.texi (Invoking guix repl): Add documentation for --list-types. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Antero Mejr
2023-01-16transformations: Let users know when '--with-latest' has no effect....* guix/transformations.scm (package-with-upstream-version): Print a message when VERSION is false and SOURCE has the same version as P. Ludovic Courtès
2023-01-16transformations: Add '--with-version'....This is a followup to 8aeccc6240ec45f0bc7bed655e0c8149ae4253eb. * guix/transformations.scm (package-with-upstream-version): New procedure. (transform-package-latest)[package-with-latest-upstream]: Remove. Use 'package-with-upstream-version' instead. (transform-package-version): New procedure. (%transformations, %transformation-options) (show-transformation-options-help/detailed): Add '-with-version'. * tests/transformations.scm ("options->transformation, with-version"): New test. * doc/guix.texi (Package Transformation Options): Document '--with-version'. (Defining Package Variants): Mention it. Ludovic Courtès
2023-01-16guix graph: '--path' defaults to "out" in the case of multiple outputs....Previously, "guix graph -t references --graph guix guile" would fail with: no path from '/gnu/store/…-guix-1.4.0-1.9fe5b49' to '/gnu/store/…-guile-3.0.8-debug' simply because the "debug" happened to be the first one, getting bound to NODE2. With this change it will instead pick the "out" output of each. * guix/scripts/graph.scm (guix-graph)[shorter?, length-sorted]: New procedures. In the 'path?' case, use the latter to store node lists. Ludovic Courtès
2023-01-16guix graph: 'guix graph --path' correctly handles multiple outputs....Previously, "guix graph -t references --path guix guile" would fail with: error: '--path' option requires exactly two nodes (given 2) This is because '_' in the 'match' clause wouldn't match the placeholder and would instead be interested as a variable name, thereby meaning NODES is expected to have two lists with the same tail. * guix/scripts/graph.scm (guix-graph): Rename '_' in 'mlet' to '_g' so that the literal '_' used in 'match' below matches. Ludovic Courtès
2023-01-15environment: Fix '--emulate-fhs' option overriding $PATH....Fixes <https://issues.guix.gnu.org/60566> where even if "--preserve='^PATH$'" was passed to 'guix shell' it would be replaced by just the FHS directories when '--emulate-fhs' was also set. * gnu/scripts/environment.scm (launch-environment): Add the FHS directories to $PATH rather than overriding $PATH completely. * tests/guix-environment-container.sh: Test that FHS directories are in $PATH in the container and that $PATH can be preserved. Co-authored-by: Ludovic Courtès <ludo@gnu.org> John Kehayias
2023-01-15guix: dune-build-system: Do not use `test-target' argument....This lets dune run all tests for a given package. * guix/build/dune-build-system.scm (check): Do not use `test-target' argument. * gnu/package/ocaml.scm (ocaml-cohttp)[native-inputs]: Add ocaml-crowbar. (ocaml-cudf, opam, ocaml-frontc, ocaml-qcheck, ocaml-qtest) (ocaml-stringext, ocaml4.07-ppx-tools-versioned, ocaml-result) (ocaml4.09-result, ocaml5.0-result, ocaml-csv, ocaml-alcotest) (ocaml4.07-alcotest, ocaml-ssl, ocaml-optint, ocaml-eio) (ocaml-eio-luv, ocaml-uring, ocaml-eio-linux, ocaml-eio-main) (ocaml-gen, ocaml-ocp-indent, ocaml-benchmark, ocaml-re) (ocaml4.07-re, ocaml-ocplib-endian, ocaml-cstruct, ocaml-hex) (ocaml-ezjsonm, ocaml-uri, ocaml4.07-uri, ocaml-camomile, ocaml-zed) (ocaml-lambda-term, ocaml-utop, ocaml-ansiterminal, dedukti, ocaml-bindlib) (ocaml-earley, ocaml-timed, ocaml-yojson, ocaml-gsl, ocaml-ppx-deriving) (ocaml-ppx-cold, ocaml-ppx-typerep-conv, ocaml-ppx-stable) (ocaml-ppx-base, ocaml-ppx-disable-unused-warnings, ocaml-ppx-jane) (ocaml4.07-jane-street-headers, ocaml4.07-bisect-ppx, ocaml-fftw3) (ocaml-cairo2, lablgtk3, ocaml-lablgtk3-sourceview3, ocaml-bigstringaf) (ocaml-angstrom, ocaml-uri-sexp, ocaml-cohttp, js-of-ocaml) (ocaml-monolith, ocaml-crowbar): Remove test-target argument. Signed-off-by: Julien Lepiller <julien@lepiller.eu> pukkamustard
2023-01-09import/cran: Fix Bioconductor updater....* guix/import/cran.scm (latest-bioconductor-release): Use LATEST-VERSION instead of VERSION, which is always #F. Ricardo Wurmus
2023-01-09read-print: Do not use extended notation when printing '1+', '1-', etc....* guix/read-print.scm (%special-non-extended-symbols): New variable. (symbol->display-string): New procedure. (pretty-print-with-comments): Use it in lieu of 'string->symbol'. * tests/read-print.scm: Add test. Ludovic Courtès
2023-01-09derivations: 'read-derivation' correctly handles case with empty hash....Reported by Stephen Paul Weber <singpolyma@singpolyma.net> at <https://lists.gnu.org/archive/html/guix-devel/2023-01/msg00035.html>. * guix/derivations.scm (read-derivation)[outputs->alist]: Treat the empty hash case as non-fixed-output whether or not the hash algorithm is the empty string, and preserve the hash algorithm in <derivation-output>. * tests/derivations.scm ("'download' built-in builder, no fixed-output hash") ("fixed-output-derivation?, no hash", "read-derivation with hash = #f"): New tests. Ludovic Courtès
2023-01-09substitute: Parse '_NIX_OPTIONS' once....* guix/scripts/substitute.scm (find-daemon-option): Arrange to call 'daemon-options' only once. Ludovic Courtès
2023-01-08refresh: Add CLI tests....* guix/import/test.scm, tests/guix-refresh.sh: New files. * Makefile.am (MODULES, SH_TESTS): Add them. Ludovic Courtès
2023-01-08import: stackage: Catch networking errors in predicate....* guix/import/stackage.scm (stackage-lts-package?): Wrap body in 'false-if-networking-error'. Ludovic Courtès
2023-01-08gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors....Previously, in a networking-less environment such as 'guix shell -C -D guix', 'guix refresh --list-updaters' would crash due to a 'gettaddrinfo-error' exception in these predicates. * guix/gnu-maintenance.scm (%gnu-updater)[pred]: Wrap in 'false-if-networking-error'. (%gnu-ftp-updater)[pred]: Likewise. Ludovic Courtès
2023-01-08gnu-maintenance: Factorize 'false-if-networking-failure'....* guix/import/utils.scm (call-with-networking-exception-handler): New procedure. (false-if-networking-error): New macro. * guix/gnu-maintenance.scm (import-html-updatable-release): Use it instead of inline code. Ludovic Courtès
2023-01-07substitutes: Log the failing queries....* guix/substitutes.scm (%debug?): New variable. (handle-narinfo-response): Log the failing queries if the %debug? parameter is set. Mathieu Othacehe
2023-01-07scripts: publish: Add a custom baking header....Log the not-found responses and their reason (baking or not) to stdout. Also send the X-Baking custom header so that the client can be informed of the cause of the failure. * guix/scripts/publish.scm (not-found): Add a baking? argument to add the X-Baking HTTP header to the response if baking is in progress. Also, log the 404 responses to stdout, indicating if it is due to baking or not. (render-narinfo/cached): Pass the baking? argument. Mathieu Othacehe
2023-01-05environment: Avoid false positive on 'PS1' check....* guix/scripts/environment.scm (validate-child-shell-environment): Do not warn when 'PS1' refers to 'GUIX_ENVIRONMENT'. Ludovic Courtès
2023-01-05environment: Simplify 'PS1' suggestion on '--check'....* guix/scripts/environment.scm (validate-child-shell-environment): In 'PS1' suggestion, remove 'export' and avoid 'if'. Ludovic Courtès
2023-01-05home: '--version' really says "guix home"....* guix/scripts/home.scm (%options): Fix argument to 'show-version-and-exit'. Ludovic Courtès
2023-01-03refresh: Always return an <update-spec> for each command-line option....This fixes a regression introduced in 8aeccc6240ec45f0bc7bed655e0c8149ae4253eb whereby packages specified via -e, -r, or -m, as well as packages *not* specified on the command line, would all lead to a wrong-type error. Reported by Ricardo Wurmus <rekado@elephly.net> at <https://lists.gnu.org/archive/html/guix-devel/2022-12/msg00311.html>. * guix/scripts/refresh.scm (<update-spec>): Move above. Rename constructor to '%update-spec' and add separate 'update-spec' procedure with optional #:version parameter. (options->update-specs): Always return a list of <update-spec> and update docstring accordingly. Rename 'args-packages' to 'update-specs' and ensure it's a list of <update-spec>; handle 'manifest' arguments here. Ludovic Courtès
2023-01-03refresh: Honor user-provided target version and report downgrades....Previously, 'guix refresh guile=3.0.0' would print: 3.0.8 is already the latest version of guile With this change, it prints: guile would be downgraded from 3.0.8 to 3.0.0 This is a followup to 8aeccc6240ec45f0bc7bed655e0c8149ae4253eb. * guix/scripts/refresh.scm (check-for-package-update): Take an <update-spec> instead of a <package>. Report downgrades as such when UPDATE-SPEC specifies a target version. (guix-refresh): Adjust caller. Ludovic Courtès
2023-01-03upstream: Allow downgrades....Previously, 'guix refresh -u guile=3.0.0' would do nothing. With this change, it actually downgrades 'guile'. This is a followup to 8aeccc6240ec45f0bc7bed655e0c8149ae4253eb. * guix/upstream.scm (package-update): Ignore 'version>?' check when #:version is passed. Warn about downgrades. Ludovic Courtès
2023-01-03ui: It's 2023 now!...* guix/ui.scm (show-version-and-exit): Change year to 2023. Ludovic Courtès
2022-12-31import/cran: Depend on gfortran if .f files are detected too....There was an inconsistency between tarball-needs-fortran? and directory-needs-fortran?. * guix/import/cran.scm (directory-needs-fortran?): Match .f files too. Lars-Dominik Braun
2022-12-31import/cran: Use multiple values instead of a list of lists....* guix/import/cran.scm (source-dir->dependencies): Return multiple values. (description->package): Bind two values. Ricardo Wurmus