summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* home: import: Clarify alias parsing code.Ludovic Courtès2022-03-20
| | | | | | | * guix/scripts/home/import.scm (generate-bash-configuration+modules) [bash-alias->pair]: Return #f on match failure. [parse-aliases]: Adjust accordingly and use 'match'. Remove 'filter' call.
* home: import: Properly parse aliases that contain quotes.Ludovic Courtès2022-03-20
| | | | | | | | | * guix/scripts/home/import.scm (generate-bash-configuration+modules): Define 'alias-rx'. [bash-alias->pair]: Use it. * tests/home-import.scm (match-home-environment-bash-service-with-alias): New variable. ("manifest->code: Bash service with aliases"): New test.
* guix home: Show "container" in '--help' output.Ludovic Courtès2022-03-19
| | | | | | This is a followup to 094a2cfbe45c104d0da30ff9d975d052ca0c118c. * guix/scripts/home.scm (show-help): Add "container".
* guix home: Add 'container' command.Ludovic Courtès2022-03-19
| | | | | | | | | | | | | | | | | * guix/scripts/home.scm (show-help, %options): Add '--network', '--share', and '--expose'. (not-config?, user-shell, spawn-home-container): New procedures. (%default-system-profile): New variable. (perform-action): Add #:file-system-mappings, #:container-command, and #:network?; honor them. (process-action): Adjust accordingly. (guix-home)[parse-sub-command]: Add "container". [parse-args]: New procedure. Use it instead of 'parse-command-line'. * tests/guix-home.sh: Add tests. * doc/guix.texi (Declaring the Home Environment): Mention 'guix home container' as a way to test configuration. (Invoking guix home): Document it.
* guix system: Call 'export-graph' with the right port argument.Ludovic Courtès2022-03-18
| | | | | * guix/scripts/system.scm (export-extension-graph) (export-shepherd-graph): Honor PORT.
* guix home: Implement the 'extension-graph' and 'shepherd-graph' actions.Ludovic Courtès2022-03-18
| | | | | | | | | | | | | | | Until now these two actions were silently ignored. * guix/scripts/home.scm (show-help, %options): Add "--graph-backend". (%default-options): Add 'graph-backend' key. (export-extension-graph, export-shepherd-graph): New procedures. (perform-action): Add #:graph-backend parameter. Add cases for the 'extension-graph' and 'shepherd-graph' actions. (process-action): Pass #:graph-backend to 'perform-action'. * guix/scripts/system.scm (service-node-type) (shepherd-service-node-type): Export * tests/guix-home.sh: Add tests. * doc/guix.texi (Invoking guix home): Document it.
* graph: Factorize 'lookup-backend'.Ludovic Courtès2022-03-18
| | | | | | | * guix/graph.scm (lookup-backend): New procedure. * guix/scripts/graph.scm (lookup-backend): Remove. * guix/scripts/system.scm (lookup-backend): Remove. * po/guix/POTFILES.in: Add 'guix/graph.scm'.
* ui: 'show-what-to-build' highlights "would be downloaded" headings.Ludovic Courtès2022-03-18
| | | | * guix/ui.scm (show-what-to-build): Highlight "X MB would be downloaded".
* ui: 'show-what-to-build' highlights "The following [...] will be built".Ludovic Courtès2022-03-18
| | | | | | * guix/colors.scm (highlight/warn): New procedure. * guix/ui.scm (show-what-to-build): Use 'highlight/warn' when displaying what would/will be built.
* utils: Add ar-for-target and ld-for-target procedures.Maxim Cournoyer2022-03-18
| | | | * guix/utils.scm (ar-for-target, ld-for-target): New procedures.
* packages: 'modify-inputs' preserves outputs in 'replace' clauses.Ludovic Courtès2022-03-16
| | | | | | | | | Fixes <https://issues.guix.gnu.org/53915>. Reported by Gordon Quad <gordon@niflheim.info>. * guix/packages.scm (replace-input): Preserve the outputs of INPUT by default. * tests/packages.scm ("modify-inputs, replace, extra output"): New test.
* Revert "gnu: Add %final-inputs-riscv64."Efraim Flashner2022-03-16
| | | | | | This reverts commit 0444be868903356a37fc8ffd3cdf820ca038f3e6. This is no longer necessary after the gcc STARTFILE_PREFIX_SPEC commit.
* transformations: '--tune' prints supported micro-architectures upon error.Ludovic Courtès2022-03-14
| | | | | * guix/transformations.scm (build-system-with-tuning-compiler): Add &fix-hint condition when asked for an unsupported micro-architecture.
* build-system/ocaml: Use standard packages as "build inputs".Ludovic Courtès2022-03-14
| | | | | | | | | | Conceptually, "standard packages" (GCC, Coreutils, etc.) are "build inputs". In the absence of cross-compilation support, this change has no effect, except for things like '--tune' that expect the compiler to be among the build inputs. * guix/build-system/ocaml.scm (lower): Move (standard-packages) from 'host-inputs' to 'build-inputs'.
* gexp: Correctly handle #$output in 'gexp->approximate-sexp'.Maxime Devos2022-03-13
| | | | | | | | | | | | | | | | | | | | | | | | This addresses the following backtrace from "guix lint -c wrapper-inputs hostapd": Backtrace:ostapd@2.10 [wrapper-inputs]... [...] 174:9 3 (gexp->approximate-sexp #<gexp (modify-phases %standard?>) In srfi/srfi-1.scm: 586:17 2 (map1 (#<gexp-output out> #<gexp-input "pkg-config":o?>)) In guix/gexp.scm: 175:16 1 (_ _) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `match-error' with args `("match" "no matching pattern" #<gexp-output out>)'. * guix/gexp.scm (gexp->approximate-sexp): Handle the case where 'reference' is a <gexp-output>,, by returning (*approximate*). * tests/gexp.scm ("gexp->approximate-sexp, outputs"): Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gexp: Correctly handle unquoting S-exp objects.Maxime Devos2022-03-13
| | | | | | | | | | | | This fixes a false-positive in the linter: guix lint -c 'wrapper-inputs' libaio * guix/gexp.scm (gexp->approximate-sexp): Allow the 'thing' in <gexp-input> to be a sexp, without approximation, by testing if it is a record. * tests/gexp.scm ("unquoted sexp (not a gexp!)"): Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* lint: check-tests-true: Allow #:tests? #t for some build systems.Maxime Devos2022-03-11
| | | | | | | | | | | | | | | | emacs-build-system sets #:tests? #f by default, so the linter shouldn't warn if #:tests? #t is set for packages using emacs-build-system. Likewise for texlive-build-system. * guix/lint.scm (check-tests-true): Do not warn if the build system is emacs-build-system or texlive-build-system. * tests/lint.scm ("tests-true: #:tests? #t acceptable for emacs packages") ("tests-true: #:tests? #t acceptable for texlive packages"): New tests. Fixes: <https://issues.guix.gnu.org/50299> Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* import: hackage: Use SRFI-71 instead of SRFI-11.Ludovic Courtès2022-03-07
| | | | | | | * guix/import/hackage.scm (read-cabal-and-hash) (hackage-fetch-and-hash, hackage-fetch) (hackage->guix-package): Use 'let' and 'let*' instead of 'let-values' and 'let*-values'.
* import: hackage: Avoid pointless use of 'compose'.Ludovic Courtès2022-03-07
| | | | | | * guix/import/hackage.scm (hackage-module->sexp): Unroll pointless calls to 'compose'. (hackage->guix-package): Likewise.
* scripts: import: gem: Fix recursive error handling.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/scripts/import/gem.scm (guix-import-gem): Handle error. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: cran: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/pypi.scm (cran->guix-package): Return 'values'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: elpa: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/elpa.scm (elpa->guix-package): Return values. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: hackage: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/hackage.scm (hackage->guix-package): Return 'values'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: pypi: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/pypi.scm (pypi->guix-package): Return two values when PROJECT is false. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import: pypi: Gracefully handle missing project home page.Ludovic Courtès2022-03-07
| | | | | | | | | Fixes <https://issues.guix.gnu.org/54259>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/import/pypi.scm (pypi->guix-package): Upon 'missing-source-error?', raise '&fix-hint' only if 'project-info-home-page' returns a non-empty string.
* derivations: Coalesce inputs that have the same output path.Ludovic Courtès2022-03-07
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/54209>. * guix/derivations.scm (coalesce-duplicate-inputs): Use the output paths of DRV as a hash table key. * tests/derivations.scm ("derivation with duplicate fixed-output inputs"): Expect a single input for FINAL. ("derivation with equivalent fixed-output inputs"): New test.
* build-system/meson: Add more cross-compilation targets.Efraim Flashner2022-03-07
| | | | | | * guix/build-system/meson.scm (make-machine-alist): Add riscv64-linux option for cpu_family. Add riscv64-linux and powerpc-linux options for endian.
* import: github: Reuse HTTP connection for the /tags URL fallback.Ludovic Courtès2022-03-06
| | | | | | | * guix/import/github.scm (fetch-releases-or-tags): Call 'open-connection-for-uri' and reuse the same connection for the two 'http-fetch' calls. * .dir-locals.el (scheme-mode): Add 'call-with-port'.
* http-client: Correctly handle redirects when #:keep-alive? #t.Ludovic Courtès2022-03-06
| | | | | | | | | Previously PORT would be closed unconditionally, which broke redirects when #:keep-alive? #t is given. * guix/http-client.scm (http-fetch): Make 'port' a parameter of 'loop'. Upon 3xx responses, do not close PORT is KEEP-ALIVE? is true, but consume RESP's body. Add second argument to 'loop'.
* import: github: Gracefully handle rate limit exhaustion.Ludovic Courtès2022-03-06
| | | | | | | | | | | | | | | | | | | | Previously, 'guix refresh' would literally crash when the rate limit was reached due to the call to 'error'. With this change, the updater notices when the rate limit is reached and it turns itself into a no-op until the rate limit has been reset. When running "guix refresh" (with no arguments), the 'github' updater gets used until the rate limit has been reached, after which "guix refresh" automatically picks up the next valid updater, typically 'generic-git'. * guix/import/github.scm (fetch-releases-or-tags): Use 'http-fetch' directly instead of 'json-fetch' to let 'http-get-error?' exceptions through. Handle 403 errors with an 'X-RateLimit-Remaining' header. (%rate-limit-reset-time): New variable. (update-rate-limit-reset-time!, request-rate-limit-reached?): New procedures. (latest-released-version): Remove calls to 'error'.
* http-client: Add response headers to '&http-get-error'.Ludovic Courtès2022-03-06
| | | | | * guix/http-client.scm (&http-get-error)[headers]: New field. (http-fetch): Initialize the 'headers' field.
* download: Fix typo in procedure name.Ludovic Courtès2022-03-03
| | | | | | * guix/build/download.scm (make-credendials-with-ca-trust-files): Rename to... (make-credentials-with-ca-trust-files): ... this.
* download: Load X.509 certificates only once.Ludovic Courtès2022-03-03
| | | | | | | | Previously we'd load /etc/ssl/certs/*.pem (or similar) every time 'http-fetch' is called. * guix/build/download.scm (make-credendials-with-ca-trust-files): Wrap in 'mlambda'.
* download: Remove obsolete bit from docstring.Ludovic Courtès2022-03-03
| | | | | | | This is a followup to f4cde9ac4aedb516c050a30fd999673da434bfa0. * guix/build/download.scm (open-connection-for-uri): Remove bit about 'close-connection' from the docstring.
* shell: Disable caching when '-p' is passed.Ludovic Courtès2022-03-02
| | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/53658>. Reported by Guillaume Le Vaillant <glv@posteo.net>. Previously we would wrongfully cache things, by adding a new (profile . _) pair to the option alist, when the user runs: guix shell -p /path/to/profile -q * guix/scripts/shell.scm (profile-cached-gc-root): Add ('profile . _) case.
* guix: Index the man-db database via man pages names.Maxim Cournoyer2022-03-02
| | | | | | | Fixes <https://issues.guix.gnu.org/38838>. * guix/man-db.scm (write-mandb-database): Use the abbreviated base name of the man page as the key, not its full file name.
* pull: No longer print upgraded/added packages upon completion.Ludovic Courtès2022-02-27
| | | | | * guix/scripts/pull.scm (build-and-install): Remove call to 'display-profile-news' and adjust accordingly.
* pull: '--news' no longer shows package lists.Ludovic Courtès2022-02-27
| | | | | | | | | | * guix/scripts/pull.scm (display-channel-news): Return #t when news were displayed. (display-news): Add #:profile-news? parameter and honor it. Print something there were no news. (process-query): For 'display-news', call 'display-channel-news' directly. * doc/guix.texi (Invoking guix pull): Adjust accordingly.
* build: julia-build-system: Fix corner-case for parallel tests.zimoun2022-02-24
| | | | | | | * guix/build/julia-build-system.scm (check): Do not run parallel tests when '--cores=1'. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* build: julia: Add 'julia-package-dependencies' as keyword.Efraim Flashner2022-02-24
| | | | | | | | | | | * guix/build-system/julia.scm (link-depot): Accept julia-package-dependencies keyword and use it for 'julia-create-package-toml' function. (julia-create-package-toml): Use pattern matching. (julia-build): Add 'julia-pacakge-dependencies'. * guix/build/julia-build-system.scm (julia-build): Add '#:julia-package-dependencies' keyword. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* guix build: Warn when attempting to build an unsupported package.Ludovic Courtès2022-02-18
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/51801>. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/scripts/build.scm (options->derivations)[warn-if-unsupported]: New procedure. [compute-derivation]: Use it. * tests/guix-build.sh: Add test.
* profiles: 'profile-derivation' rejects unsupported packages.Ludovic Courtès2022-02-18
| | | | | | | | | | | | | Previously user-facing commands would happily start building packages even if they do not support that system. With this change, all the user-facing commands reject unsupported packages without going further. * guix/profiles.scm (profile-derivation): Add #:allow-unsupported-packages?. Define 'check-supported-packages' and honor #:allow-unsupported-packages?. * tests/guix-pack.sh, tests/guix-package.sh, tests/guix-shell.sh: Ensure that unsupported packages are rejected. * tests/guix-system.sh: Pass "--system=armhf-linux" when attempting to build gnu/system/examples/asus-c201.tmpl.
* packages: 'package-transitive-supported-systems' ignores ↵Ludovic Courtès2022-02-18
| | | | | | | | | | | | | '%current-target-system'. Previously 'package-transitive-supported-systems' would enter an infinite loop over the cross-compilation tool chain if %CURRENT-TARGET-SYSTEM was set. * guix/packages.scm (package-transitive-supported-systems)[supported-systems-procedure]: Pass explicit SYSTEM and TARGET parameters. * tests/packages.scm ("supported-package? vs. %current-target-system"): New test.
* status: Do not pass a non-literal format string to 'format'.Ludovic Courtès2022-02-16
| | | | | * guix/status.scm (print-build-event): Use 'display' instead of 'format' for hooks.
* status: Use bold more sparsely at -v1.Ludovic Courtès2022-02-16
| | | | | | | | | | | | | | Until now, at -v1, all the "apply N grafts" messages (for instance) would be displayed in bold. This would typically result in several subsequent lines all bold, although none of them is particularly interesting. This improves on that by avoiding bold at -v1 for these messages. * guix/status.scm (print-build-event)[emph]: New variable. Use it for the "View build log", "expected hash", and "offloading build" messages. [info]: Default to 'identity' when PRINT-URLS? and PRINT-LOG? are both false.
* status: Do not print .drv file names for grafts.Ludovic Courtès2022-02-16
| | | | | | | | | | | With this change, "guix build vim-full" prints: applying 15 grafts for vim-full-8.2.4306 ... instead of showing /gnu/store/…-vim-full-8.2.4306.drv. * guix/status.scm (print-build-event): In the 'graft' case, print just the "package name" part of DRV.
* gexp: Preserve source location for #~ and #$ read extensions.Ludovic Courtès2022-02-16
| | | | | | | | | | | | | | | | | Read hash extensions preserve source location info as source properties on their result. However, in Guile 3.0.8, that location would be dismissed, leading 'local-file' to fail to resolve file names relative to the source directory. Fixes <https://issues.guix.gnu.org/54003>. Reported by Aleksandr Vityazev <avityazev@posteo.org>. * guix/gexp.scm <eval-when> [read-syntax-redefined?, read-procedure] [read-syntax*]: New variables. [read-ungexp]: Adjust to expect either sexps or syntax objects. [read-gexp]: Call 'read-procedure'. * tests/gexp.scm ("local-file, relative file name, within gexp") ("local-file, relative file name, within gexp, compiled"): New tests.
* guix system: Fix 'describe' when booting the latest generation.Ludovic Courtès2022-02-15
| | | | | | | | | | | Fixes a regression introduced in 9679123ce083c69cdfd1505d95a4066d41280394, whereby 'guix system describe' would error out when /run/current-system points to /gnu/store/…-system, which is the case when booting the latest generation or after reconfigure. * guix/scripts/system.scm (process-command): For 'describe'. Try 'generation-number' with and without the optional argument.
* gexp: 'computed-file' always uses a native Guile.Ludovic Courtès2022-02-15
| | | | | | | | | | | | Fixes a regression whereby, when cross-compiling, 'computed-file' would use a cross-compiled Guile as its builder, which would fail to run. Regression introduced in af57d1bf6c46f47d82dbc234dde1e16fa8634e9d (the problem had always been there but was hidden before behind the (not guile) condition.) * guix/gexp.scm (computed-file-compiler): For 'guile', pass #:target #f. * tests/gexp.scm ("lower-object, computed-file, #:target"): New test.
* profiles: texlive-font-maps: Create ls-R file.Ricardo Wurmus2022-02-14
| | | | | * guix/profiles.scm (texlive-font-maps): Run mktexlsr on resulting tree to provide ls-R file.