summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* 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.
* pull: '--list-generations' pipes its output to the pager.Ludovic Courtès2022-02-14
| | | | | | | * guix/scripts/pull.scm (process-query): For 'list-generations queries, use 'with-paginated-output-port'. (display-news-entry-title): Pass second argument to 'highlight'. (display-news-entry): Pass second argument to 'dim'.
* ui: 'display-generation' uses color when talking to a pager.Ludovic Courtès2022-02-14
| | | | | | | | This makes sure that, say, 'guix pull -l' benefits from colors when its output is piped to a pager, as long as the underlying terminal supports it. * guix/ui.scm (display-generation): Add second argument to 'highlight'.
* ui: 'with-paginated-output-port' gives access to the wrapped port.Ludovic Courtès2022-02-14
| | | | | | * guix/ui.scm (pager-port-mapping): New variable. (pager-wrapped-port): New procedure. (call-with-paginated-output-port): Parameterize 'pager-port-mapping'.
* pull: '--list-generations' lists packages only with '--details'.Ludovic Courtès2022-02-14
| | | | | | * guix/scripts/pull.scm (show-help, %options): Add "--details". (process-query): Honor it. * doc/guix.texi (Invoking guix pull): Document it.
* publish: Do not sign the URL/Compression/FileSize narinfo fields.Ludovic Courtès2022-02-14
| | | | | | | | | | | | | | This will allow mirror operators to alter these non-normative bits of a narinfo without having to resign narinfos. * guix/scripts/publish.scm (narinfo-string): Remove URL/Compression/FileSize from BASE-INFO. Move them after "Signature". * tests/publish.scm ("/*.narinfo") ("/*.narinfo with properly encoded '+' sign") ("/*.narinfo with lzip + gzip") ("with cache, lzip + gzip"): Adjust accordingly. * tests/substitute.scm ("query narinfo with signature over relevant subset"): New test.
* git-authenticate: Ensure the target is a descendant of the introductory commit.Ludovic Courtès2022-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug whereby authentication of a commit *not* descending from the introductory commit could succeed, provided the commit verifies the authorization invariant. In the example below, A is a common ancestor of the introductory commit I and of commit X. Authentication of X would succeed, even though it is not a descendant of I, as long as X is authorized according to the '.guix-authorizations' in A: X I \ / A This is because, 'authenticate-repository' would not check whether X descends from I, and the call (commit-difference X I) would return X. In practice that only affects forks because it means that ancestors of the introductory commit already contain a '.guix-authorizations' file. * guix/git-authenticate.scm (authenticate-repository): Add call to 'commit-descendant?'. * tests/channels.scm ("authenticate-channel, not a descendant of introductory commit"): New test. * tests/git-authenticate.scm ("authenticate-repository, target not a descendant of intro"): New test. * tests/guix-git-authenticate.sh: Expect earlier test to fail since 9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604 is not a descendant of $intro_commit. Add new test targeting an ancestor of the introductory commit, and another test targeting the v1.2.0 commit. * doc/guix.texi (Specifying Channel Authorizations): Add a sentence.
* git: Add 'commit-descendant?'.Ludovic Courtès2022-02-14
| | | | | * guix/git.scm (commit-descendant?): New procedure. * tests/git.scm ("commit-descendant?"): New test.
* tests: Set a hard build timeout.Ludovic Courtès2022-02-14
| | | | | | * guix/tests.scm (open-connection-for-tests): Pass #:timeout to 'set-build-options'. (call-with-external-store): Add call to 'set-build-options'.
* gnu: cpu: Add detection for AMD CPUs.Efraim Flashner2022-02-13
| | | | | | * guix/cpu.scm <cpu>: Add vendor field. (current-cpu): Also fill in the 'vendor' field. (cpu->gcc-architecture): Add detection logic for AMD CPUs.
* guix: cpu: Rewrite based on feature flags.Efraim Flashner2022-02-13
| | | | | * guix/cpu.scm (cpu->gcc-architecture): Rewrite detection based on detected feature flags.
* tests: Pass #:guile to 'computed-file' & co.Ludovic Courtès2022-02-11
| | | | | | | | | | | | | | | | | Fixes a regression introduced in af57d1bf6c46f47d82dbc234dde1e16fa8634e9d whereby tests would end up building the world. * guix/gexp.scm (mixed-text-file): Add #:guile parameter and honor it. * tests/gexp.scm ("mixed-text-file"): Pass #:guile to 'mixed-text-file'. ("file-union"): Pass #:guile to 'file-union'. ("lower-object, computed-file"): Pass #:guile to 'computed-file'. ("lower-object, computed-file + grafts"): Likewise. * tests/packages.scm ("origin->derivation, single file with snippet"): Likewise. * tests/profiles.scm ("profile-derivation, ordering & collisions"): Likewise. * guix/tests.scm (test-file): Likewise.
* build-system/texlive: Be explicit about #:guile-for-build.Ludovic Courtès2022-02-11
| | | | | | | | This ensures package derivations are not a function of the value of (%guile-for-build). * guix/build-system/texlive.scm (texlive-build): Explicitly pass #:guile-for-build to 'gexp->derivation'.
* gexp: <computed-file> does not honor (%guile-for-build).Ludovic Courtès2022-02-11
| | | | | | | | * guix/gexp.scm (computed-file-compiler): Default to (default-guile). That way, lowering of <computed-file> is not affected by the '%guile-for-build' parameter. (file-union): Add #:guile parameter and honor it. * gnu/packages/ruby.scm (ruby-tzinfo-data): Pass #:guile to 'file-union'.
* deprecation: Refine the old daemon deprecation warning message.Maxim Cournoyer2022-02-08
| | | | | | | | | * guix/deprecation.scm (warn-about-old-daemon): Mention a direct consequence of failing to upgrade the daemon. * guix/store.scm (build-things): Add a comment explaining the rationale to emit a deprecation warning for a daemon older than version 0x163. Suggested-by: Ricardo Wurmus <rekado@elephly.net>
* store: Warn about daemon deprecation.Mathieu Othacehe2022-02-08
| | | | | * guix/deprecation.scm (warn-about-old-daemon): New procedure. * guix/store.scm (build-things): Use it to warn about old daemons.
* import: utils: Harden beautify-description.Alice BRENON2022-02-08
| | | | | | | | | | | * guix/import/utils.scm (beautify-description): Handle non-string arguments. [use-modules]: Explicitly import G_ from (guix i18n) and make (guix ui) import explicit. * guix/import/opam.scm: [use-modules] Make imports explicit for module (guix import utils). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build: Fix typo in file-size docstring.Maxim Cournoyer2022-02-07
| | | | * guix/build/store-copy.scm (file-size): Fix typo.
* guix: Restore profile hook for TeX Live font maps.Ricardo Wurmus2022-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long ago we had a profile hook, called “texlive-configuration”, which would operate on the texlive-* packages that have actually been installed in the profile, build a union directory, and then install a texmf.cnf file that declared the prefix of the TeX Live tree to be the union directory. It then generated font maps based on the fonts that had actually been installed. This approach had multiple disadvantages, the worst of which was that you could only really have one TeX Live tree. Commit 04a0b1e09abce99857e7930336421ca6d15ae630 addressed this, where texmf.cnf was modified *once* and for all in texlive-bin to reference the GUIX_TEXMF variable to determine the root of the tree. This made much of “texlive-configuration” obsolete, because we didn’t need to have any union directories at all, because we had no need for a customized per-profile variant of texmf.cnf. Unfortunately, with the loss of the profile hook we would no longer build font maps. This patch resurrects the profile hook: we’re again generating font maps (such as pdftex.map) based on the contents of the profile. * gnu/packages/tex.scm (texlive-default-updmap.cfg): New variable. * guix/profiles.scm (texlive-configuration): Rename this... (texlive-font-maps): ...to this; update to run updmap-sys on the contents of the profile to generate only font maps. (%default-profile-hooks): Add texlive-font-maps. * guix/status.scm (hook-message): Rename unused texlive-configuration to texlive-font-maps.
* guix: maven: Fix java parser.Julien Lepiller2022-02-05
| | | | | * guix/build/maven/java.scm (comment, comment-chr): Support more comment styles.
* deploy: Add '--execute'.Ludovic Courtès2022-02-02
| | | | | | | | * guix/scripts/deploy.scm (show-help, %options): Add '--execute'. (invoke-command): New procedure. (guix-deploy): Break arguments at "--" and handle '-x' and associated command. * doc/guix.texi (Invoking guix deploy): Document it.
* guix system: 'describe' shows the running system, not the current one.Ludovic Courtès2022-02-02
| | | | | | | | | * guix/profiles.scm (generation-number): Add optional 'base-profile' parameter and use it. * guix/scripts/system.scm (process-command): Add "/run/current-system" as first argument to 'generation-number'. * doc/guix.texi (Invoking guix system): Clarify that 'guix system describe' shows the running system.
* import: pypi: Display a hint upon "no source release" errors.Ludovic Courtès2022-02-02
| | | | | | | Fixes <https://issues.guix.gnu.org/49083>. * guix/import/pypi.scm (pypi->guix-package): Upon 'missing-source-error?', raise a compound condition with a hint.
* import: pypi: Use 'with-error-handling'.Ludovic Courtès2022-02-02
| | | | | * guix/scripts/import/pypi.scm (guix-import-pypi): Wrap body in 'with-error-handling'.
* build-system: emacs: Ensure that package descriptions are generated.Andrew Tropin2022-01-29
| | | | | | | | | | | | | | This patch addresses the second part of <https://bugs.gnu.org/48331>. While existing -pkg.el files were previously installed, no such files were generated for packages lacking them, resulting in packages not being listed as installed and not being available towards “describe-package”. * guix/build/emacs-build-system.scm (find-root-library-file) (ensure-package-description): New variables. (%standard-phases): Add ‘ensure-package-description’. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
* home: 'reconfigure' checks for potential downgrades.Ludovic Courtès2022-01-28
| | | | | | | | | | * guix/scripts/home.scm (show-help, %options): Add "--allow-downgrades". (%default-options): Remove 'build-mode'; add 'validate-reconfigure'. (perform-action): Add #:validate-reconfigure. Call 'check-forward-update' when ACTION is 'reconfigure. (process-action): Pass #:validate-reconfigure to 'perform-action'. * gnu/home/services.scm (home-provenance): Export. * doc/guix.texi (Invoking guix home): Document '--allow-downgrades'.
* inferior: Move initialization bits away from 'inferior-eval-with-store'.Ludovic Courtès2022-01-27
| | | | | | | * guix/inferior.scm (port->inferior): In the inferior, define 'cached-store-connection', 'store-protocol-error?', and 'store-protocol-error-message'. (inferior-eval-with-store): Use them.
* inferior: Inferior caches store connections.Ludovic Courtès2022-01-27
| | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/48007>. Reported by Ricardo Wurmus <rekado@elephly.net>. Previously, at each 'inferior-eval-with-store' call, the inferior would create a new <store-connection> object with empty caches. Consequently, when repeatedly calling 'inferior-package-derivation', we would not benefit from any caching and instead recompute all the derivations for every package. This patch fixes it by caching <store-connection> objects in the inferior. * guix/inferior.scm (port->inferior): Define '%store-table' in the inferior. (inferior-eval-with-store): Cache store connections in %STORE-TABLE. Remove now unneeded 'dynamic-wind' with 'close-port' call.
* inferior: Keep the store bridge connected.Ludovic Courtès2022-01-27
| | | | | | | | | | | | | | | | | | | | | Previously, each 'inferior-eval-with-store' would lead the inferior to connect to the named socket the parent is listening to. With this change, the connection is established once for all and reused afterwards. * guix/inferior.scm (<inferior>)[bridge-file-name]: Remove. (open-bidirectional-pipe): New procedure. (inferior-pipe): Use it instead of 'open-pipe*' and return two values. (port->inferior): Adjust call to 'inferior'. (open-inferior): Adjust to 'inferior-pipe' changes. (close-inferior): Remove 'inferior-bridge-file-name' handling. (open-store-bridge!): Switch back to 'call-with-temporary-directory'. Define '%bridge-socket' in the inferior, connected to the caller. (proxy): Change first argument to be an inferior. Add 'reponse-port' and call to 'drain-input'. Pass 'reponse-port' to 'select' and use it as a loop termination clause. (inferior-eval-with-store): Remove 'socket' and 'connect' calls from the inferior code, and use '%bridge-socket' instead.
* inferior: Create the store proxy listening socket only once.Ludovic Courtès2022-01-27
| | | | | | | | | | | | | | | Previously, each 'inferior-eval-with-store' call would have the calling process create a temporary directory with a listening socket in there. Now that listening socket is created once and reused in subsequent calls. * guix/inferior.scm (<inferior>)[bridge-file-name, bridge-socket]: New fields. (port->inferior): Adjust accordingly. (close-inferior): Close 'inferior-bridge-socket' and delete 'inferior-bridge-file-name' if set. (open-store-bridge!, ensure-store-bridge!): New procedures. (inferior-eval-with-store): Use them.
* gnu: Add %final-inputs-riscv64.Efraim Flashner2022-01-27
| | | | | | * gnu/packages/commencement.scm (%final-inputs-riscv64): New variable. * guix/build-system/gnu.scm (standard-inputs): Use %final-inputs-riscv64 when targeting riscv64-linux.
* import: pypi: Convert hyphens to underscores in PyPI URLs if needed.Vivien Kraus2022-01-26
| | | | | | | | | | | | * guix/import/pypi.scm (find-project-url): New function. (make-pypi-sexp): Use find-project-url. * tests/pypi.scm (foo-json): New procedure. (test-json-1, test-json-2): Define in terms of it. ("find-project-url, with numpy", "find-project-url, uWSGI"): ("find-project-url, flake8-array-spacing") ("find-project-url, foo/goo"): New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org>