summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2021-11-11profiles: Add a gdk-pixbuf-loaders-cache-file hook.Maxim Cournoyer
This paves the way toward properly fixing https://issues.guix.gnu.org/50957. * guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure... (%default-profile-hooks): ... and register it as a profile hook. * guix/status.scm (hook-message): Register it here too.
2021-11-11build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase.Maxim Cournoyer
Adding a profile hook to do so covers most use cases, but it is still necessary to have the gdk-pixbuf loaders cache file computed at build time, as software may expect to find loaders support at that time. * guix/build/glib-or-gtk-build-system.scm: Delete trailing #t. (%gdk-pixbuf-loaders-cache-file-prefix): New variable. (generate-gdk-pixbuf-loaders-cache): New procedure. (generate-gdk-pixbuf-loaders-cache-file): Add procedure... (%standard-phases): ... and register it as a build phase.
2021-11-11build: glib-or-gtk-build-system: Fix indentation.Maxim Cournoyer
* guix/build/glib-or-gtk-build-system.scm (gtk-module-directories) (wrap-all-programs): Fix indentation.
2021-11-11build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase.Maxim Cournoyer
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs) <handle-output>: Precisely build the list of variable specifications, rather than relying on a bunch of conditionals.
2021-11-11guix: packages: Fix repacking of plain tarballs.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/50066>. * guix/packages.scm (patch-and-repack): Test for a tarball using tarball? and move the plain file copy to the else clause. Reported-by: Mathieu Othacehe <othacehe@gnu.org>
2021-11-11build: qt-utils: Don't wrap .X-real files.Brendan Tildesley
* guix/build/qt-utils.scm (find-files-to-wrap): Exclude already wrapped programs. This is forbidden in wrap-program now due to a738a663a99. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-11-11import: print: Replace packages and origins in 'arguments'.Ludovic Courtès
* guix/import/print.scm (package->code)[variable-reference] [object->code]: New procedures. [package-lists->code]: Rewrite in terms of 'object->code'. Pass the 'arguments' field through 'object->code'. * tests/print.scm (pkg-with-arguments, pkg-with-arguments-source): New variables. ("package with arguments"): New test.
2021-11-11import: print: Handle patches that are origins.Ludovic Courtès
* guix/import/print.scm (package->code)[source->code]: Handle patches that are origins. * tests/print.scm (pkg-with-origin-input): Add 'patches' field. (pkg-with-origin-patch, pkg-with-origin-patch-source): New variables. ("package with origin patch"): New test.
2021-11-11import: print: Correctly handle URI lists.Ludovic Courtès
* guix/import/print.scm (package->code)[factorized-uri-code]: New procedure. [source->code]: Use it, and factorize URI when it's a list. * tests/print.scm (pkg-with-origin-input): Check origin URI to a list.
2021-11-11import: print: Properly render packages with origins as inputs.Ludovic Courtès
* guix/import/print.scm (package->code)[source->code]: Check whether VERSION is true before calling 'factorize-uri'. [package-lists->code]: Add clause for inputs that are origins. * tests/print.scm (pkg-with-origin-input, pkg-with-origin-input-source): New variables. ("package with origin input"): New test.
2021-11-11import: cran: Allow imports of a specific version.Ludovic Courtès
* guix/import/cran.scm (download): Handle the case where URL is a list. (fetch-description-from-tarball): New procedure. (fetch-description): Add #:version parameter. Honor it when REPOSITORY is 'cran. Use 'fetch-description-from-tarball' when REPOSITORY is 'bioconductor. (description->package): SOURCE-URL may now be a list. (cran->guix-package): Pass VERSION to 'fetch-description'. (cran-recursive-import): Add #:version parameter. * guix/scripts/import/cran.scm (guix-import-cran): Expect a spec rather than a mere package name. * doc/guix.texi (Invoking guix import): Document it.
2021-11-11import: pypi: Allow imports of a specific version.Ludovic Courtès
* guix/import/pypi.scm (latest-version): New procedure. (latest-source-release): Rename to... (source-release): ... this. Add 'version' parameter. (latest-wheel-release): Rename to... (wheel-release): ... this. Add 'version' parameter. (pypi->guix-package): Honor 'version' parameter. (pypi-recursive-import): Add 'version' parameter and honor it. * guix/scripts/import/pypi.scm (guix-import-pypi): Expect a spec. Pass it to 'package-name->name+version'. Pass the 'version' parameter. * tests/pypi.scm ("pypi->guix-package, no wheel"): Exercise the #:version parameter. * doc/guix.texi (Invoking guix import): Document it.
2021-11-10store: 'mapm/accumulate-builds' does not compare stores with 'eq?'.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/51732>. Regression introduced in 2015d3f042870860efef10e801b93eacc0742d38. The (eq? store expected-store) comparison doesn't work on this branch where the functional cache, with 'cache-object-mapping', is used extensively, thereby changing the store's object identity. * guix/store.scm (build-accumulator): Compare the socket of STORE and EXPECTED-STORE rather than the store themselves.
2021-11-08Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner
2021-11-07guix: Upgrade to Bioconductor 3.14.Ricardo Wurmus
* guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to 3.14. * guix/import/cran.scm (%bioconductor-version): Same.
2021-11-07shell: Actually clean up the profile cache.Ludovic Courtès
Previously, most actions would leave the cache as-is because 'guix-environment*' would indirectly call 'exit', and thus its continuation was never reached. * guix/scripts/shell.scm (guix-shell): Move call to 'maybe-remove-expired-cache-entries' to EXIT-HOOK.
2021-11-07import: egg: Allow imports of a specific version.Xinglu Chen
* guix/import/egg.scm (eggs-repository): Change URL. (egg-metadata): Accept optional #:version keyword argument. (egg->guix-package): Accept ‘version’ argument. (egg-recursive-import): Add ‘version’ argument and honor it. * guix/scripts/import/egg.scm (guix-import-egg): Parse a specification instead of just a package name. * doc/guix.texi (Invoking guix import): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-07home: services: bash: Add ‘aliases’ field.Xinglu Chen
* doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (home-bash-extensions): Adjust accordingly. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Populate the ‘alias’ field. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-07ui: 'load*' correctly reports 'read-error' in all cases.Ludovic Courtès
Previously, 'read-error' exceptions other than "missing closing paren" would not be reported; instead, we'd directly call (exit 1) without printing anything. Fixes <https://issues.guix.gnu.org/51463>. Reported by Alice BRENON <alice.brenon@ens-lyon.fr>. * guix/ui.scm (report-load-error): Report the error without re-throwing upon 'read-error'. * tests/guix-build.sh: Add test.
2021-11-07utils: Define a target-x86-32? and target-x86-64? predicate.Maxime Devos
* guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-11-06environment: Suggest command upon 'execlp' failure.Ludovic Courtès
* guix/scripts/environment.scm (launch-environment): Call 'primitive-_exit' upon 'system-error. (suggest-command-name, validate-exit-status): New procedures. (launch-environment/fork): Call 'validate-exit-status'. (launch-environment/container)[exit/status*]: New procedure. Use it instead of 'exit/status'.
2021-11-06profiles: Build the man database only if 'man-db' is in the profile.Ludovic Courtès
This allows us to skip the expensive man-db profile hook in most cases. Suggested by Liliana Marie Prikler <liliana.prikler@gmail.com>. * guix/profiles.scm (manual-database/optional): New procedure. (%default-profile-hooks): Use it instead of 'manual-database'. * doc/guix.texi (Documentation): Add footnote about 'man -k' database creation.
2021-11-06import: elpa: Work around Guile 3.0.[5-7] compiler bug.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/49006>. Reported by Xinglu Chen <public@yoctocell.xyz>. * guix/import/elpa.scm (elpa-package->sexp)[melpa-recipe]: Add call to 'identity'.
2021-11-03Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner
2021-11-02import: stackage: Update to release 18.14.Lars-Dominik Braun
* guix/import/stackage.scm (%default-lts-version): Update to 18.14.
2021-10-31Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner
2021-10-31ui: Use DISPLAY in SHOW-GUIX-HELP.Tobias Geerinckx-Rice
* guix/ui.scm (show-guix-help): Use DISPLAY where FORMAT isn't needed.
2021-10-31ui: Add top-level options to help text.Tobias Geerinckx-Rice
This also makes automated ‘guix --h<Tab>’ completion possible. * guix/ui.scm (show-guix-help): Document that an OPTION's an option, and all valid options.
2021-10-31home: import: Avoid duplication of 'manifest->code'.Ludovic Courtès
* guix/scripts/home/import.scm (manifest->code): Remove. (manifest+configuration-files->code): New procedure. (import-manifest): Use 'manifest+configuration-files->code' instead of 'manifest->code'. * tests/home-import.scm (eval-test-with-home-environment): Likewise. (match-home-environment-transformations): New procedure. ("manifest->code: No services, package transformations"): New test.
2021-10-31home: import: Factorize triplicated 'version-spec' procedure.Ludovic Courtès
* guix/scripts/package.scm (manifest-entry-version-prefix): New procedure, moved from... (export-manifest)[version-spec]: ... here. Adjust caller. * tests/home-import.scm (version-spec): Remove. (eval-test-with-home-environment): Use 'manifest-entry-version-prefix' instead. * guix/scripts/home/import.scm (import-manifest): Likewise.
2021-10-31home: import: Clarify "destination directory".Ludovic Courtès
Suggested by Liliana Marie Prikler <liliana.prikler@gmail.com>. * guix/scripts/home/import.scm (configurations+modules): Rename 'destination-directory' to 'configuration-directory'. Improve docstring.
2021-10-31home: import: Compare procedures with 'eq?'.Ludovic Courtès
'procedure-name' is a debugging aid and cannot be reliably used to check for procedure equality. * guix/scripts/home/import.scm (configurations+modules): Remove use of 'procedure-name'.
2021-10-31guix home: import: Call ‘local-file’ with ‘name’Xinglu Chen
Set the name of the file to just the basename of the file passed to ‘local-file’. * guix/scripts/home/import.scm (basename+remove-dots): New procedure. (generate-bash-configuration+modules): Use it. * tests/home-import.scm (match-home-environment-bash-service): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-31Add tests for ‘guix home import’.Xinglu Chen
* tests/home-import.scm: New file. * Makefile.am (SCM_TESTS): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-31guix home: import: Delete duplicate modules when importing.Xinglu Chen
Two different services might require the same module(s), so delete duplicates when generating the ‘use-modules’ form. * import.scm (manifest->code): Delete duplicate modules. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-31guix home: import: Don’t use 'slurp-file-gexp'.Xinglu Chen
‘slurp-file-gexp’ is not a bound procedure. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Don’t use ‘slurp-file-gexp’. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-31guix home: import: Fix module name for Bash service.Xinglu Chen
* guix/scripts/home/import.scm (generate-bash-configuration+modules): Change (gnu home-services bash) to (gnu home-services shells); add (guix gexp). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-31guix home: import: Allow multiple modules to be imported for each service.Xinglu Chen
Previously, only one module could be imported for each service, e.g., only (gnu home-services shell) could be imported when generating the Bash service declaration. However, for some services, multiple modules might need to be imported in order for it to work. * guix/scripts/home/import.scm (generate-bash-module+configuration): Rename to ... (generate-bash-configuration+modules): ... this. (%files-configurations-alist): Rename to ... (%files+configurations-alist): ... this. (modules+configurations): Rename to ... (configurations+modules): ... this. (manifest->code): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-31guix home: import: Make the user to specify a destination directory.Xinglu Chen
Copy the appropriate the relevant configuration files to the destination directory, and call ‘local-file’ on them. Without this, ‘guix home import’ will generate a service declaration like this (service home-bash-service-type (home-bash-configuration (bashrc (list (slurp-file-gexp (local-file "/home/yoctocell/.bashrc")))))) but when running ‘guix home reconfigure’, the ~/.bashrc file would be moved, so when running ‘guix home reconfigure’ for the second time, it would read the ~/.bashrc which is itself a symlink to a file the store. * guix/scripts/home/import.scm (generate-bash-module+configuration): Take ‘destination-directory’ parameter (modules+configurations): Copy the user’s configuration file to ‘%destination-directory’. * guix/scripts/home.scm (process-command): Adjust accordingly; create ‘destination’ if it doesn’t exist. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-30shell: Error out when an unauthorized guix.scm/manifest.scm is found.Ludovic Courtès
The previous behavior was confusing: a warning would be printed and 'guix shell' would go on starting an empty environment. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/shell.scm (auto-detect-manifest): Change "not loading" case from warning to error. * tests/guix-shell.sh: Adjust accordingly.
2021-10-28packages: Optionally validate Texinfo markup at expansion time.Ludovic Courtès
* guix/packages.scm (validate-texinfo): New macro. (<package>)[synopsis, description]: Add 'sanitize' property.
2021-10-28ui: Gracefully handle invalid Texinfo markup in package blurbs.Ludovic Courtès
Previously 'guix search' & co. would crash when encountering invalid Texinfo. * guix/ui.scm (texi->plain-text*): New procedure. (package-field-string, package->recutils): Use it.
2021-10-28store: 'map/accumulate-builds' handler checks the store received.Ludovic Courtès
This is a followup to b19250eec6f92308f237a09a43e8e3e2355345b9, providing a proper fix for <https://issues.guix.gnu.org/46756>. * guix/remote.scm (remote-eval): Revert b19250eec6f92308f237a09a43e8e3e2355345b9. * guix/store.scm (build-accumulator): Turn into a procedure. Call CONTINUE when the store is not eq? to the initial store. (map/accumulate-builds): Adjust accordingly. * tests/store.scm ("map/accumulate-builds and different store"): New test.
2021-10-28import: cran: Use the standard diagnostic procedures.Ludovic Courtès
* guix/import/cran.scm (bioconductor-packages-list) (fetch-description): Use 'warning' instead of 'format'.
2021-10-28environment: Fix broken file-local variable.Zhu Zihao
* guix/scripts/environment.scm (Local Variables): Add missing eval. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-28remote: Really build things remotely when #:build-locally? is #false.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/46756>. Reported by pkill9 <pkill9@runbox.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com>, and Katherine Cox-Buday <cox.katherine.e@gmail.com>. * guix/remote.scm (remote-eval): When BUILD-LOCALLY? is false, wrap 'build-derivations' call in 'with-build-handler'.
2021-10-26syscalls: Gracefully handle failure to load libc's libutil.Ludovic Courtès
In particular, libutil is not found when running code on a statically-linked Guile. Reported by mahmooz on #guix. * guix/build/syscalls.scm (syscall->procedure): Add #:library parameter and honor it. (openpty, login-tty): Use 'syscall->procedure' instead of calling 'dynamic-link' directly.
2021-10-26shell: Suggest running '--check' once for interactive use.Ludovic Courtès
* guix/scripts/shell.scm (hint-directory, hint-file, record-hint) (hint-given?): New procedures. (guix-shell): Record and probe the 'shell-check' hint.
2021-10-26environment: Add '--check'.Ludovic Courtès
* guix/scripts/environment.scm (show-environment-options-help) (%options): Add '--check'. * guix/scripts/environment.scm (child-shell-environment) (validate-child-shell-environment): New procedures. (guix-environment*): Call 'validate-child-shell-environment' when 'check?' key is in OPTS. * doc/guix.texi (Invoking guix shell): Shorten footnote about Bash startup files. Document '--check' and mention startup files. (Invoking guix environment): Document '--check'.
2021-10-26syscalls: Add 'openpty' and 'login-tty'.Ludovic Courtès
* guix/build/syscalls.scm (openpty, login-pty): New procedures. * tests/syscalls.scm ("openpty", "openpty + login-tty"): New tests.