summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2022-01-17guix home: Default verbosity is the same as for 'guix system'.Ludovic Courtès
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.
2022-01-17inferior: 'cached-channel-instance' always returns a directory.Ludovic Courtès
This is a followup to b1fc98d6b063a117fe2bcc19a60c8b9a48301593. * guix/inferior.scm (cached-channel-instance): When AUTHENTICATE? is false, return (derivation->output-path profile).
2022-01-17Merge branch 'version-1.4.0'Maxim Cournoyer
With resolved conflicts in: gnu/packages/gnome.scm gnu/packages/openstack.scm gnu/packages/python-xyz.scm
2022-01-16import/github: Test it.Maxime Devos
* 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>
2022-01-16import/github: Return <git-reference> objects for git-fetch origins.Maxime Devos
* 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>
2022-01-10build-system/gnu: Make gzip files writable before resetting timestamps.Sarah Morgensen
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>
2022-01-10guix: lint: Fix comment per TODO.Maxim Cournoyer
* guix/lint.scm (check-wrapper-inputs): Address TODO in comment.
2022-01-10utils: Fix wrap-script argument handling.Brendan Tildesley
* 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>
2022-01-10style: '-S format' canonicalizes comments.Ludovic Courtès
* 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.
2022-01-10style: Add '--styling' option.Ludovic Courtès
* 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.
2022-01-10style: Add support for "newline forms".Ludovic Courtès
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.
2022-01-10style: Allow special forms to be scoped.Ludovic Courtès
* 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.
2022-01-10style: Improve pretty printer and add tests.Ludovic Courtès
* 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.
2022-01-10build: julia-build-system: Create 'Project.toml' file when missing.zimoun
* 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>
2022-01-10import: texlive: Update error message.Ricardo Wurmus
We aren't downloading anything. * guix/scripts/import/texlive.scm (guix-import-texlive): Update error message.
2022-01-10import: texlive: Remove more specific entries with the same prefix.Ricardo Wurmus
* 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.
2022-01-09import: go: Correctly report diagnostics upon version mismatch.Ludovic Courtès
* 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.
2022-01-09scripts: import: go: Wrap body in 'with-error-handling'.Ludovic Courtès
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'.
2022-01-09guix: node-build-system: Add 'delete-dependencies' helper function.Philip McGrath
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>
2022-01-09guix: node-build-system: Add avoid-node-gyp-rebuild phase.Philip McGrath
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>
2022-01-09guix: node-build-system: Add JSON utilities.Philip McGrath
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>
2022-01-09guix: node-build-system: Add implicit libuv input.Philip McGrath
* guix/build-system/node.scm (lower): Add the version of libuv used as an input to the #:node package as an additional implicit input, so that packages needing libuv always get the correct version. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-09guix: node-build-system: Add delete-lockfiles phase.Philip McGrath
Guix does not use any of these lock files to determine the package versions used during the build, so they only serve to cause problems. * guix/build/node-build-system.scm (delete-lockfiles): New variable. (%standard-phases): Add 'delete-lockfiles' after 'patch-dependencies'. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-14compile: Disable cross-module inlining and related features.Ludovic Courtès
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.
2022-01-14scripts: system: Rationalize persistency.Mathieu Othacehe
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.
2022-01-14gnu: bootstrap: Add support for riscv64-linux.Efraim Flashner
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.
2022-01-13import: texlive: Remove labels from 'propagated-inputs' field.Ludovic Courtès
* guix/import/texlive.scm (tlpdb->package): Remove labels from 'propagated-inputs' field. * tests/texlive.scm ("texlive->guix-package"): Adjust accordingly.
2022-01-13inferior: Fix wrong-type-arg error when authentication is disabled.Ludovic Courtès
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.
2022-01-12build: clojure-utils: Don't try to compile Clojure.Reily Siegel
* guix/build/clojure-utils.scm (%aot-include): Add "data-readers" to the default list of files to exclude from ahead-of-time compilation.
2022-01-12build-system: clojure: Allow clojure-build-system to pass source to ant.Reily Siegel
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>
2022-01-11ui: 'package->recutils' can split the "system:" line.Ludovic Courtès
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.
2022-01-11shell: Cache profiles even when using package specs.Ludovic Courtès
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.
2022-01-11build-system: Pass #:make-dynamic-linker-cache? #f when cross-compiling.Ludovic Courtès
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.
2022-01-10guix hash: Allow '-r' as a non-deprecated alias.Ludovic Courtès
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.
2022-01-06guix home, system: Use 'leave' to report missing generations.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/50982>. Reported by Xinglu Chen <public@yoctocell.xyz>. Fixes a typo ('error' instead of 'leave') introduced in 158032bd7dcc33d17da8091b2319bf59ee9db6a1 and copied in 89e05a695574fdabd76834aba35ad125620b8b5d. * guix/scripts/system.scm (process-command): Use 'leave', not 'error'. * guix/scripts/home.scm (process-command): Likewise.
2022-01-06upstream: Support updating and fetching 'git-fetch' origins.Sarah Morgensen
Updaters need to be modified to return 'git-reference' objects. This patch modifies the 'generic-git' and 'minetest' updater, but others might need to be modified as well. * guix/git.scm (git-reference->git-checkout): New procedure. * guix/upstream.scm (package-update/git-fetch): New procedure. (<upstream-source>)[urls]: Document it can be a 'git-reference'. (%method-updates): Add 'git-fetch' mapping. (update-package-source): Support 'git-reference' sources. (upstream-source-compiler/url-fetch): Split off from ... (upstream-source-compiler): ... this, and call ... (upstream-source-compiler/git-fetch): ... this new procedure if the URL field contains a 'git-reference'. * guix/import/git.scm (latest-git-tag-version): Always return two values and document that the tag is returned as well. (latest-git-release)[urls]: Use the 'git-reference' instead of the repository URL. * guix/import/minetest.scm (latest-minetest-release)[urls]: Don't wrap the 'git-reference' in a list. * tests/minetest.scm (upstream-source->sexp): Adjust to new convention. Co-authored-by: Maxime Devos <maximedevos@telenet.be> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-06refresh: Support non-tarball sources.Sarah Morgensen
* guix/scripts/refresh.scm (update-package): Use 'file-hash*' instead of 'port-sha256'. Rename TARBALL to OUTPUT. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-06import: Factorize file hashing.Sarah Morgensen
* guix/import/cran.scm (vcs-file?, file-hash): Remove procedures. (description->package): Use 'file-hash*' instead. * guix/import/elpa.scm (vcs-file?, file-hash): Remove procedures. (git-repository->origin, elpa-package->sexp): Use 'file-hash* instead'. * guix/import/go.scm (vcs-file?, file-hash): Remove procedures. (git-checkout-hash): Use 'file-hash*' instead. * guix/import/minetest.scm (file-hash): Remove procedure. (make-minetest-sexp): Use 'file-hash*' instead. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-06guix hash: Extract file hashing procedures.Sarah Morgensen
* guix/scripts/hash.scm (guix-hash)[vcs-file?] (nar-hash, default-hash): Extract hashing logic to... * guix/hash.scm (vcs-file?, file-hash*): ... these new procedures in this new file. Modified-by: Maxime Devos <maximedevos@telenet.be> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-05import: elpa: Also check NonGNU ELPA for updates.Xinglu Chen
* guix/import/elpa.scm (latest-release): Determine the repository based on the URL of the source. (package-from-gnu.org?): Rename to ... (elpa-repository): ...this; memoize. (package-from-elpa-repository?): New procedure. (%elpa-updater): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-05home: import: Fix handling of manifest entries with specific output.Arjan Adriaanse
specification->package fails on manifest entries with specific outputs, resulting in an invalid home configuration. This changes the import command to use specification->package+output instead. * guix/scripts/home/import.scm (manifest+configuration-files->code): Make sure manifest entries with specific output are also handled. * tests/home-import.scm: Specify output in home environment manifest entry. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-05linux-container: Handle CLONE_NEWCGROUP and use it by default.Ryan Sundberg
Adds low-level support for launching Linux containers with cgroup namespaces. * gnu/build/linux-container.scm (%namespaces): Add 'cgroup. (namespaces->bit-mask): Handle it. * guix/build/syscalls.scm (CLONE_NEWCGROUP): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-05guix/upstream: Let changed-inputs support the new input lists.Ricardo Wurmus
* guix/upstream.scm (changed-inputs): Add match clauses for new-style input lists.
2022-01-04guix hash: Allow '--exclude-vcs' option using 'git' serializer.zimoun
* guix/scripts/hash.scm (git-hash): Use '#:select?' with 'git-hash-directory'. * tests/guix-hash.sh: Adjust accordingly. Signed-off-by: Timothy Sample <samplet@ngyro.com>
2022-01-03offload: Do not read ~/.ssh/config.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/39366>. Reported by zimoun <zimon.toutoune@gmail.com>. * guix/scripts/offload.scm (open-ssh-session): Pass #:config.
2022-01-01transformations: Add '--tune'.Ludovic Courtès
* guix/transformations.scm (tuning-compiler) (tuned-package, tunable-package?, package-tuning) (transform-package-tuning) (build-system-with-tuning-compiler): New procedures. (%transformations): Add 'tune'. (%transformation-options): Add "--tune". * tests/transformations.scm ("options->transformation, tune") ("options->transformations, tune, wrong micro-architecture"): New tests. * doc/guix.texi (Package Transformation Options): Document '--tune'.
2022-01-01Add (guix cpu).Ludovic Courtès
* guix/cpu.scm: New file. * Makefile.am (MODULES): Add it.
2022-01-01ui: It's 2022!Leo Famulari
Happy new year! * guix/ui.scm (show-version-and-exit): Change the year to 2022.
2021-12-30utils: Fix URL in comment.Tobias Geerinckx-Rice
* guix/utils.scm (target-x86-32?): Fix Wikipedia URL.
2021-12-29substitute: Document the limited UI.Tobias Geerinckx-Rice
* guix/scripts/substitute.scm (show-help): Accept exactly one OPTION.