summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* inferior: Use 'spawn' on Guile 3.0.9+.Ludovic Courtès2023-01-26
| | | | | * guix/inferior.scm (open-bidirectional-pipe): When 'spawn' is defined, use it instead of 'primitive-fork'.
* ui: Add "error-reporting wrapper" for 'mkdir'.Ludovic Courtès2023-01-25
| | | | | * guix/ui.scm <top level>: Change 'mkdir' to use an error-reporting wrapper.
* channels: 'channel->code' emits 'channel' field only when necessary.Ludovic Courtès2023-01-23
| | | | | * guix/channels.scm (channel->code): Emit 'commit' field only when it is true.
* import: opam: Do not crash when description is missing.Ludovic Courtès2023-01-23
| | | | | | | | 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.
* platforms: Raise an exception when no suitable platform is found.Maxim Cournoyer2023-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* debug-link: Protect against dangling symlinks.Ludovic Courtès2023-01-17
| | | | | | | | 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'.
* build-system/meson: Add mips64el cross compilation support.Mathieu Othacehe2023-01-17
| | | | * guix/build-system/meson.scm (make-machine-alist): Add it.
* scripts: repl: Add -i, --interactive flag.Antero Mejr2023-01-16
| | | | | | | | * 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>
* scripts: repl: Add --list-types flag.Antero Mejr2023-01-16
| | | | | | | * 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>
* transformations: Let users know when '--with-latest' has no effect.Ludovic Courtès2023-01-16
| | | | | * guix/transformations.scm (package-with-upstream-version): Print a message when VERSION is false and SOURCE has the same version as P.
* transformations: Add '--with-version'.Ludovic Courtès2023-01-16
| | | | | | | | | | | | | | | 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.
* guix graph: '--path' defaults to "out" in the case of multiple outputs.Ludovic Courtès2023-01-16
| | | | | | | | | | | | | | | 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.
* guix graph: 'guix graph --path' correctly handles multiple outputs.Ludovic Courtès2023-01-16
| | | | | | | | | | | | | | 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.
* environment: Fix '--emulate-fhs' option overriding $PATH.John Kehayias2023-01-15
| | | | | | | | | | | | | 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>
* guix: dune-build-system: Do not use `test-target' argument.pukkamustard2023-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* import/cran: Fix Bioconductor updater.Ricardo Wurmus2023-01-09
| | | | | * guix/import/cran.scm (latest-bioconductor-release): Use LATEST-VERSION instead of VERSION, which is always #F.
* read-print: Do not use extended notation when printing '1+', '1-', etc.Ludovic Courtès2023-01-09
| | | | | | | * 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.
* derivations: 'read-derivation' correctly handles case with empty hash.Ludovic Courtès2023-01-09
| | | | | | | | | | | 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.
* substitute: Parse '_NIX_OPTIONS' once.Ludovic Courtès2023-01-09
| | | | | * guix/scripts/substitute.scm (find-daemon-option): Arrange to call 'daemon-options' only once.
* refresh: Add CLI tests.Ludovic Courtès2023-01-08
| | | | | * guix/import/test.scm, tests/guix-refresh.sh: New files. * Makefile.am (MODULES, SH_TESTS): Add them.
* import: stackage: Catch networking errors in predicate.Ludovic Courtès2023-01-08
| | | | | * guix/import/stackage.scm (stackage-lts-package?): Wrap body in 'false-if-networking-error'.
* gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors.Ludovic Courtès2023-01-08
| | | | | | | | | | 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.
* gnu-maintenance: Factorize 'false-if-networking-failure'.Ludovic Courtès2023-01-08
| | | | | | | | * 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.
* substitutes: Log the failing queries.Mathieu Othacehe2023-01-07
| | | | | | * guix/substitutes.scm (%debug?): New variable. (handle-narinfo-response): Log the failing queries if the %debug? parameter is set.
* scripts: publish: Add a custom baking header.Mathieu Othacehe2023-01-07
| | | | | | | | | | | 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.
* environment: Avoid false positive on 'PS1' check.Ludovic Courtès2023-01-05
| | | | | * guix/scripts/environment.scm (validate-child-shell-environment): Do not warn when 'PS1' refers to 'GUIX_ENVIRONMENT'.
* environment: Simplify 'PS1' suggestion on '--check'.Ludovic Courtès2023-01-05
| | | | | * guix/scripts/environment.scm (validate-child-shell-environment): In 'PS1' suggestion, remove 'export' and avoid 'if'.
* home: '--version' really says "guix home".Ludovic Courtès2023-01-05
| | | | * guix/scripts/home.scm (%options): Fix argument to 'show-version-and-exit'.
* refresh: Always return an <update-spec> for each command-line option.Ludovic Courtès2023-01-03
| | | | | | | | | | | | | | | | | | 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.
* refresh: Honor user-provided target version and report downgrades.Ludovic Courtès2023-01-03
| | | | | | | | | | | | | | | | | 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.
* upstream: Allow downgrades.Ludovic Courtès2023-01-03
| | | | | | | | | | 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.
* ui: It's 2023 now!Ludovic Courtès2023-01-03
| | | | * guix/ui.scm (show-version-and-exit): Change year to 2023.
* import/cran: Depend on gfortran if .f files are detected too.Lars-Dominik Braun2022-12-31
| | | | | | | There was an inconsistency between tarball-needs-fortran? and directory-needs-fortran?. * guix/import/cran.scm (directory-needs-fortran?): Match .f files too.
* import/cran: Use multiple values instead of a list of lists.Ricardo Wurmus2022-12-31
| | | | | * guix/import/cran.scm (source-dir->dependencies): Return multiple values. (description->package): Bind two values.
* import/utils: recursive-import: Pass on lookup-node's version argument.Ricardo Wurmus2022-12-31
| | | | | | * guix/import/utils.scm (recursive-import)<lookup-node>: Replace the #:VERSION keyword from RECURSIVE-IMPORT's arguments with the value of VERSION passed to LOOKUP-NODE.
* import/cran: Always operate on source directory.Lars-Dominik Braun2022-12-31
| | | | | | | | | | | | | | | | | Extracting the source tarball multiple times is very slow and a speedup of >2x (without network I/O) can be achieved by coalescing all NEEDS-X? functions into a single one, which extracts a tarball only once. * guix/import/cran.scm (tarball-needs-fortran?): Remove unused function. (needs-fortran?): Ditto. (tarball-files-match-pattern?): Ditto. (tarball-needs-zlib?): Ditto. (needs-zlib?): Ditto. (tarball-needs-pkg-config?): Ditto. (needs-pkg-config?): Ditto. (source-dir->dependencies): New function. (source->dependencies): New function. (description->package): Use it.
* import/cran: Translate more package dependencies.Lars-Dominik Braun2022-12-31
| | | | | | | Assumes we use package variable names, not package specification names. * guix/import/cran.scm (invalid-packages): Add more invalid names. (transform-sysname): Transform more package names.
* import/cran: Allow overriding tarball download.Lars-Dominik Braun2022-12-31
| | | | | | * guix/import/cran.scm (description->package): Accept new keyword argument DOWNLOAD-SOURCE. (cran->guix-package): Ditto.
* import/cran: Allow overriding description fetch function.Lars-Dominik Braun2022-12-31
| | | | | * guix/import/cran.scm (cran->guix-package): New keyword argument FETCH-DESCRIPTION.
* import/cran: Allow custom license prefix.Lars-Dominik Braun2022-12-31
| | | | | | | | | | | | * guix/import/cran.scm (string-licenses): Add license-prefix argument. (string->license): Ditto. (description->package): Ditto. (cran->guix-package): Ditto. (cran-recursive-import): Ditto. * guix/scripts/import/cran.scm (%options): Add new option -p/--license-prefix. (show-help): Document it. (parse-options): Pass it to importer. * doc/guix.texi (Invoking guix import): Document it.
* import/utils: Pass all arguments through to package builder.Lars-Dominik Braun2022-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | Individual importer may have additional arguments. * guix/import/utils.scm (recursive-import): Patch all keyword arguments through to repo->guix-package. * guix/import/cran.scm (cran->guix-package): Add #:allow-other-keys. * guix/import/crate.scm (crate->guix-package): Ditto. * guix/import/egg.scm (egg->guix-package): Ditto. * guix/import/elm.scm (elm->guix-package): Ditto. * guix/import/gem.scm (gem->guix-package): Ditto. * guix/import/gnu.scm (gnu->guix-package): Ditto. * guix/import/go.scm (go-module->guix-package): Ditto. (go-module-recursive-import): Ditto. * guix/import/hackage.scm (hackage->guix-package): Ditto. (hackage-recursive-import): Ditto. * guix/import/hexpm.scm (hexpm->guix-package): Ditto. * guix/import/minetest.scm (minetest->guix-package): Ditto. (minetest-recursive-import): Ditto. * guix/import/opam.scm (opam->guix-package): Ditto. * guix/import/pypi.scm (pypi->guix-package): Ditto. * guix/import/stackage.scm (stackage->guix-package): Ditto. (stackage-recursive-import): Ditto. * guix/import/texlive.scm (texlive->guix-package): Ditto.
* records: match-record supports specifying a different variable name.Attila Lendvai2022-12-27
| | | | | | | | | | | | | | An example: (match-record obj <my-type> (field1 (field2 custom-var-name) field3) ...) * guix/records.scm (match-record-inner): Add support for the new syntax. * tests/records.scm ("match-record, simple"): Add a simple test case for the new syntax. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* upstream: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | | | * guix/upstream.scm(package-latest-release): Add keyword-argument 'version' and pass it on to the updater's 'import' function. (package-update): add keyword-argument 'version' and pass it on to package-latest-release. Differentiate the error message issued when no package was found, depending on whether version was given or not.
* refresh: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | | | | * guix/scripts/refresh.scm (options->packages)[args-packages]: Handle version specification in package name arguments. (update-package): Add #:version argument and pass it on to called functions. (guix-refresh): When updating, pass the specified version (if any) to update-package. [package-list-without-versions, package-list-with-versions]: New functions.
* import: pypi: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | * guix/import/pypi.scm (latest-release): Rename to 'import-release', add #:version argument and pass it on to called functions.
* import: launchpad: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | * guix/import/launchpad.scm (latest-release): Rename to 'import-release', add #:version argument. If version is given, return an upstream-source for this version.
* import: kde: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | | * guix/import/kde.scm (latest-kde-release): Rename to 'import-kde-release', add #:version argument. Rework the code to not sort the relevant files, but just find the requested or latest version. [find-latest-archive-version]: New function.
* import: hexpm: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | * guix/import/hexpm.scm (latest-release): Rename to 'import-release', add #:version argument. If version is given, return an upstream-source for this version.
* import: gnome: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | | | * guix/import/gnome.scm (latest-gnome-release): Rename to 'import-gnome-release', add #:version argument. If version is given, try to find the respective version [find-latest-release]: New function, based on former code. [find-version-release]: New function.
* import: github: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | | * guix/import/github.scm (latest-released-version): Add #:version argument. If version is given, try to find the respective release. (latest-releease) Rename to 'import-release', add #:version argument and pass it on to 'latest-released-version'.