summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* 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>
* utils: 'edit-expression' reads and conses less when not modifying.Ludovic Courtès2022-01-26
| | | | | * guix/utils.scm (edit-expression): Delay call to 'get-bytevector-all' until after (string=? str* str).
* environment: '--check' does nothing when used with '--container'.Ludovic Courtès2022-01-25
| | | | | | | | Partly fixes <https://issues.guix.gnu.org/53355>. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/environment.scm (guix-environment*): Warn and do nothing when both '--check' and '--container' are used.
* build-system/clojure: Support compiling Java.Reily Siegel2022-01-24
| | | | | | | | | | | | | | * guix/build/clojure-build-system.scm (compile-java): New variable. (build): Copy classes compiled from Java and optionally Java sources to the final jar. (%standard-phases): Add compile-java phase before build. * guix/build/clojure-utils.scm (%java-source-dirs): New variable. (%java-compile-dir): New variable. * guix/build-system/clojure.scm (clojure-build): Include %java-source-dirs and %java-compile-dir. (builder): Include %java-source-dirs and %java-compile-dir. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build-system/clojure: Exit with non-zero if tests fail.Reily Siegel2022-01-24
| | | | | | | * guix/build/clojure-build-system.scm (check): Exit test process with a non-zero exit code if tests fail. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* compile: Really disable cross-module inlining and related features.Ludovic Courtès2022-01-23
| | | | | | | | | This is a followup to d87a1ba6b8b2f08ba6898033353d7463355bd146. * guix/build/compile.scm (strip-keyword-arguments): Rename to... (clear-keyword-arguments): ... this, and set the value associated with each of KEYWORDS to #f. (optimizations-for-level): Adjust accordingly.
* guix: ui: Fix typo in docstring.base-for-series-11087base-for-series-11086base-for-series-11085base-for-series-11084base-for-series-11083base-for-series-11082jgart2022-01-22
| | | | | | * guix/ui.scm (colorize-store-file-name)[docstring]: Fix typo. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* import/texlive: Add helper to check installed files.Ricardo Wurmus2022-01-20
| | | | * guix/import/texlive.scm (files-differ?): New procedure.
* guix: import/cran: Cast booleans.Ricardo Wurmus2022-01-20
| | | | | | | This is needed due to a change in file-hash*. * guix/import/cran.scm (description->package): Ensure that GIT? and HG? are booleans.
* package: Honor '--dry-run' when target profile is already in store.Ludovic Courtès2022-01-19
| | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/53267>. Reported by Tirifto <tirifto@posteo.cz>. Regression introduced in 65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161. In the (unlikely) case where the profile we're targeting with "guix upgrade -n" or similar is already built, a new profile generation would be created and linked to despite the use of '-n'. This is because 65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161 assumed that dry-run behavior would be handled solely by the build handler, which is not the case when there's nothing to build. * guix/scripts/package.scm (build-and-use-profile): Reintroduce #:dry-run? and honor it. (process-actions): Pass #:dry-run? to 'build-and-use-profile'. * tests/guix-package-net.sh: Add test.
* build-system/linux-module: Use G-expressions.Tobias Geerinckx-Rice2022-01-16
| | | | | * guix/build-system/linux-module.scm (make-linux-module-builder) [arguments]: Rewrite as G-expressions.
* guix home: Default verbosity is the same as for 'guix system'.Ludovic Courtès2022-01-17
| | | | | | | | | Previously the default verbosity would always be 3, and 'verbosity-level' would thus have no effect. * guix/scripts/home.scm (verbosity-level): Change to level 3 for 'build'. (%default-options): Set 'verbosity' to #f.
* inferior: 'cached-channel-instance' always returns a directory.Ludovic Courtès2022-01-17
| | | | | | | This is a followup to b1fc98d6b063a117fe2bcc19a60c8b9a48301593. * guix/inferior.scm (cached-channel-instance): When AUTHENTICATE? is false, return (derivation->output-path profile).
* Merge branch 'version-1.4.0'Maxim Cournoyer2022-01-17
|\ | | | | | | | | | | | | With resolved conflicts in: gnu/packages/gnome.scm gnu/packages/openstack.scm gnu/packages/python-xyz.scm
| * build-system/gnu: Make gzip files writable before resetting timestamps.Sarah Morgensen2022-01-10
| | | | | | | | | | | | | | guix/build/gnu-build-system.scm (reset-gzip-timestamps): Ensure gzip files are writable before resetting their timestamps. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
| * guix: lint: Fix comment per TODO.Maxim Cournoyer2022-01-10
| | | | | | | | * guix/lint.scm (check-wrapper-inputs): Address TODO in comment.
| * utils: Fix wrap-script argument handling.Brendan Tildesley2022-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/build/utils.scm (wrap-script): Don't add (car cl) one too many times, cl its self contains it's car. Split the aguments string with string-tokenize to avoid leaving an empty string argument when there should be none. These two bugs seemed to be partially cancelling each other out so that scripts still worked when ran with no arguments. * tests/build-utils.scm: Adjust wrap-script to above changes. Add two tests to ensure the command line arguments appear identical to a script and its wrapped version. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* | import/github: Test it.Maxime Devos2022-01-16
| | | | | | | | | | | | | | | | | | | | * Makefile.am (SCM_TESTS): Register new tests. * guix/import/github.scm (%github-api): New variable. (fetch-releases-or-tags): Use the new variable. * tests/import-github.scm: New file with tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* | import/github: Return <git-reference> objects for git-fetch origins.Maxime Devos2022-01-16
| | | | | | | | | | | | | | | | | | * guix/import/github.scm (latest-released-version): Also return the tag. (latest-release): Use this information to return <git-reference> objects when appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* | compile: Disable cross-module inlining and related features.Ludovic Courtès2022-01-14
| | | | | | | | | | | | | | | | This makes no difference on Guile <= 3.0.7. * guix/build/compile.scm (strip-keyword-arguments): New procedure. (optimizations-for-level): Use it to strip keywords related to cross-module inlining.
* | scripts: system: Rationalize persistency.Mathieu Othacehe2022-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that the images are created with a non volatile root by default and the vm are created with a volatile root by default. Break the --volatile option into --volatile-image and --persistent-vm options. * guix/scripts/system.scm (perform-action): Turn volatile? argument into volatile-vm-root?. (show-help): Introduce --volatile-image and --persistent-vm options instead of --volatile. (%default-options): Adapt it. (%options): Handle those options. (process-action): Honor them. * doc/guix.texi (Invoking guix system): Adapt it accordingly.
* | gnu: bootstrap: Add support for riscv64-linux.Efraim Flashner2022-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 7d93b21ab1c132990054372a9677c1639d54e631 gnu: glibc-for-bootstrap: Update patch. Run ./pre-inst-env guix build --target=riscv64-linux-gnu bootstrap-tarballs Producing /gnu/store/4hdzva9i0wyyfbgj1lmqc1wkk644pv07-bootstrap-tarballs-0 With guix hash -rx 1nj0fdgj08bbmfny01mp2blv7c3p2iciqh31zmf04ap5s7ygsqlp * gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for riscv64-linux. (%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add entry for riscv64-linux. (raw-build-guile3): New procedure. (make-raw-bag): Use raw-build-guile3 for riscv64-linux. * guix/packages.scm (%supported-systems): Add riscv64-linux. (%cuirass-supported-systems): Remove riscv64-linux. * guix/utils.scm (target-64bit?): Add riscv64-linux. * m4/guix.m4: Add riscv64-linux as a supported system. * doc/guix.texi (GNU Distribution): Add riscv64-linux.
* | import: texlive: Remove labels from 'propagated-inputs' field.Ludovic Courtès2022-01-13
| | | | | | | | | | | | * guix/import/texlive.scm (tlpdb->package): Remove labels from 'propagated-inputs' field. * tests/texlive.scm ("texlive->guix-package"): Adjust accordingly.
* | inferior: Fix wrong-type-arg error when authentication is disabled.Ludovic Courtès2022-01-13
| | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/53230>. Reported by Andrew Tropin <andrew@trop.in>. Fixes a regression introduced in 9f371f23ebfa20f70b3bfd55dc459b683f21ba91. * guix/inferior.scm (cached-channel-instance): Add call to 'derivation->output-path' when AUTHENTICATE? is false.
* | build: clojure-utils: Don't try to compile Clojure.Reily Siegel2022-01-12
| | | | | | | | | | * guix/build/clojure-utils.scm (%aot-include): Add "data-readers" to the default list of files to exclude from ahead-of-time compilation.
* | build-system: clojure: Allow clojure-build-system to pass source to ant.Reily Siegel2022-01-12
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/52598>. * guix/build-system/clojure.scm (lower): Remove #:source from private keywords, preventing an error in ant-build-system. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
* | ui: 'package->recutils' can split the "system:" line.Ludovic Courtès2022-01-11
| | | | | | | | | | | | | | | | | | | | Previously, long system lines would not be split, which would confuse 'less', possibly leading it to hide the first line of the package recutils record (the "name:" line). * guix/ui.scm (package->recutils)[split-lines]: New procedure. [dependencies->recutils]: Use it. Use it for the "systems:" value.
* | shell: Cache profiles even when using package specs.Ludovic Courtès2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables profile caching not just when '-m' or '-f' is used, but also when package specs are passed on the command line, as in: guix shell -D guix git It also changes profile cache keys to include the system type, which was previously ignored. * guix/scripts/shell.scm (options-with-caching)[single-file-for-caching]: Remove. Call 'profile-cached-gc-root' instead; adjust to accept two values. (profile-cache-primary-key): New procedure. (profile-cache-key): Remove. (profile-file-cache-key, profile-spec-cache-key): New procedures. (profile-cached-gc-root): Rewrite to include functionality formally in 'single-file-for-caching', but extend to handle package specs. * gnu/packages.scm (cache-is-authoritative?): Export. * guix/transformations.scm (transformation-option-key?): New procedure. * doc/guix.texi (Invoking guix shell): Move '--rebuild-cache' documentation to the bottom, just above '--root'. Explain caching and how these two options relate to that.
* | build-system: Pass #:make-dynamic-linker-cache? #f when cross-compiling.Ludovic Courtès2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/52898>. Reported by Maxime Devos <maximedevos@telenet.be>. This is a followup to 1209447ad3f471d12e9408dd478b3cfcd7b7a07e. * guix/build-system/cmake.scm (cmake-cross-build)[builder]: Pass #:make-dynamic-linker-cache? #f. * guix/build-system/go.scm (go-cross-build)[builder]: Ditto. * guix/build-system/guile.scm (guile-cross-build)[builder]: Ditto. * guix/build-system/qt.scm (qt-cross-build)[builder]: Ditto.
* | guix hash: Allow '-r' as a non-deprecated alias.Ludovic Courtès2022-01-10
|/ | | | | | | | | | | This is a followup to 05c962594c346da21f201be72caadfa19060cc9d. Discussed at <https://issues.guix.gnu.org/51307#24>. * guix/scripts/hash.scm (%options): Warn about deprecation for "--recursive", but not for '-r' as it's a convenient shorthand. Mention '--serializer=nar' in the deprecation message. * doc/guix.texi (Invoking guix hash): Adjust accordingly.
* style: '-S format' canonicalizes comments.Ludovic Courtès2022-01-10
| | | | | | | | | | * guix/scripts/style.scm (canonicalize-comment): New procedure. (pretty-print-with-comments): Add #:format-comment. and honor it. (object->string*): Add 'args' and honor them. (format-package-definition): Pass #:format-comment to 'object->string*'. * tests/style.scm ("pretty-print-with-comments, canonicalize-comment"): New test.
* style: Add '--styling' option.Ludovic Courtès2022-01-10
| | | | | | | | | | | | | | | | | | | * guix/scripts/style.scm (format-package-definition): New procedure. (%options, show-help): Add "--styling". (%default-options): Add 'styling-procedure'. (guix-style): Honor it. * tests/style.scm (with-test-package) ("input labels, 'safe' policy") ("input labels, 'safe' policy, nothing changed") ("input labels, margin comment") ("input labels, margin comment on long list") ("input labels, line comment") ("input labels, modify-inputs and margin comment"): Pass "-S inputs". * etc/indent-code.el: Remove. * doc/contributing.texi (Formatting Code): Mention "guix style" instead of "etc/indent-code.el". (Submitting Patches): Add item for "guix style". * doc/guix.texi (Invoking guix style): Document "-S" and update.
* style: Add support for "newline forms".Ludovic Courtès2022-01-10
| | | | | | | | | | This allows us to express cases where a newline should be inserted immediately after the head symbol of a list. * guix/scripts/style.scm (%newline-forms): New variable. (newline-form?): New procedure. (pretty-print-with-comments): Handle "newline forms". * tests/style.scm: Add test.
* style: Allow special forms to be scoped.Ludovic Courtès2022-01-10
| | | | | | | | | | | | * guix/scripts/style.scm (vhashq): Add clause for 'lst, and change default clause. (%special-forms): Add context for 'add-after and 'add-before. Add 'replace. (prefix?, special-form-lead): New procedures. (special-form?): Remove. (pretty-print-with-comments): Add 'context' to the threaded state. Adjust 'print-sequence' and adjust 'loop' calls accordingly. * tests/style.scm: Add tests for 'replace.
* style: Improve pretty printer and add tests.Ludovic Courtès2022-01-10
| | | | | | | | | | * guix/scripts/style.scm (vhashq): New macro. (%special-forms): New variable. (special-form?): New procedure. (pretty-print-with-comments): Add many clauses and tweak existing rules. * tests/style.scm (test-pretty-print): New macro. <top level>: Add 'test-pretty-print' tests.
* build: julia-build-system: Create 'Project.toml' file when missing.zimoun2022-01-10
| | | | | | | | | * guix/build/julia-build-system.scm (link-depot): Create 'Project.toml' file when missing using data provided by the user. (julia-create-package-toml): Remove from export. * doc/guix.texi (Build Systems): Update julia-build-system section. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* import: texlive: Update error message.Ricardo Wurmus2022-01-10
| | | | | | We aren't downloading anything. * guix/scripts/import/texlive.scm (guix-import-texlive): Update error message.
* import: texlive: Remove more specific entries with the same prefix.Ricardo Wurmus2022-01-10
| | | | | | * guix/import/texlive.scm (files->directories): Ensure that any more specific directory is removed if a parent directory is in the list of provided locations.
* import: go: Correctly report diagnostics upon version mismatch.Ludovic Courtès2022-01-09
| | | | | | | * guix/import/go.scm (strip-v-prefix, ensure-v-prefix) (validate-version): New procedures. (go-module->guix-package): Use 'validate-version' when defining 'version*'. Remove 'else' clause in SRFI-34 guard.
* scripts: import: go: Wrap body in 'with-error-handling'.Ludovic Courtès2022-01-09
| | | | | | | | This ensures proper error reporting and an exception reaches the top level. * guix/scripts/import/go.scm (guix-import-go): Wrap body in 'with-error-handling'.
* guix: node-build-system: Add 'delete-dependencies' helper function.Philip McGrath2022-01-09
| | | | | | | | | | | Many node packages currently skip the configure phase, because they lack both dependencies and a convenient way to build without all of them, e.g. for the purposes of bootstrapping. This patch adds a big hammer to flatten these nails. * guix/build/node-build-system.scm (delete-dependencies): New variable. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
* guix: node-build-system: Add avoid-node-gyp-rebuild phase.Philip McGrath2022-01-09
| | | | | | | | | | | | Packages with native addons currently try to write to store paths when used as dependecies. This patch adds a phase to replace that behaviour with a no-op. * guix/build/node-build-system.scm (avoid-node-gyp-rebuild): New variable. (%standard-phases): Add 'avoid-node-gyp-rebuild' after 'install'. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
* guix: node-build-system: Add JSON utilities.Philip McGrath2022-01-09
| | | | | | | | | | | | | | | | This commit adds several utility functions for non-destructive transformation of the JSON representation used by (guix build json), particularly for purely functional update of JSON objects. They ought to eventually be exported from their own module, but for now are kept private to allow experimentation. * guix/build/node-build-system.scm (assoc-ref*, jsobject-ref, alist-pop) (alist-update, jsobject-update*, jsobject-union): New variables. (with-atomic-json-file-replacement): New public variable. (module-name, build, patch-dependencies): Use them. Do not resort to unsafe alist primitives from Guile core. Co-authored-by: Liliana Marie Prikler <liliana.prikler@gmail.com>