Age | Commit message (Expand) | Author |
2022-01-11 | shell: Cache profiles even when using package specs....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.
| Ludovic Courtès |
2022-01-10 | guix hash: Allow '-r' as a non-deprecated alias....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.
| Ludovic Courtès |
2022-01-10 | style: '-S format' canonicalizes comments....* 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.
| Ludovic Courtès |
2022-01-10 | style: Add '--styling' option....* 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.
| Ludovic Courtès |
2022-01-10 | style: Add support for "newline forms"....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.
| Ludovic Courtès |
2022-01-10 | style: Allow special forms to be scoped....* 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.
| Ludovic Courtès |
2022-01-10 | style: Improve pretty printer and add tests....* 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.
| Ludovic Courtès |
2022-01-10 | import: texlive: Update error message....We aren't downloading anything.
* guix/scripts/import/texlive.scm (guix-import-texlive): Update error message.
| Ricardo Wurmus |
2022-01-09 | scripts: import: go: Wrap body in 'with-error-handling'....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'.
| Ludovic Courtès |
2022-01-06 | guix home, system: Use 'leave' to report missing generations....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.
| Ludovic Courtès |
2022-01-06 | refresh: Support non-tarball sources....* 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>
| Sarah Morgensen |
2022-01-06 | guix hash: Extract file hashing procedures....* 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>
| Sarah Morgensen |
2022-01-05 | home: import: Fix handling of manifest entries with specific output....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>
| Arjan Adriaanse |
2022-01-04 | guix hash: Allow '--exclude-vcs' option using 'git' serializer....* 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>
| zimoun |
2022-01-03 | offload: Do not read ~/.ssh/config....Fixes <https://issues.guix.gnu.org/39366>.
Reported by zimoun <zimon.toutoune@gmail.com>.
* guix/scripts/offload.scm (open-ssh-session): Pass #:config.
| Ludovic Courtès |
2021-12-29 | substitute: Document the limited UI....* guix/scripts/substitute.scm (show-help): Accept exactly one OPTION.
| Tobias Geerinckx-Rice |
2021-12-23 | scripts: system: Add a missing module....* guix/scripts/system.scm: Add a missing module.
| Mathieu Othacehe |
2021-12-23 | scripts: system: Use the disk-image size argument for VM generation....* guix/scripts/system.scm (system-derivation-for-action): Use the given
image-size unconditionnaly when calling system-qemu-image/shared-store-script.
| Mathieu Othacehe |
2021-12-23 | scripts: system: Pass the volatile field to VM generation....* guix/scripts/system.scm (system-derivation-for-action): Add new volatile?
argument and pass it to system-qemu-image/shared-store-script.
(perform-action): Add new volatile? argument and pass it to
system-derivation-for-action.
(process-action): Pass the volatile? argument to perform-action.
| Mathieu Othacehe |
2021-12-23 | scripts: system: Deprecate the docker-image command....* guix/scripts/system.scm (system-derivation-for-action): Use the image API to
generate the docker images and deprecate the docker-image command.
(process-action): Ditto.
* doc/guix.texi (Invoking guix system): Adapt it.
| Mathieu Othacehe |
2021-12-18 | style: Gracefully handle errors such as EACCES when opening files....* guix/scripts/style.scm (guix-style): Wrap body in
'with-error-handling'.
| Ludovic Courtès |
2021-12-18 | style: Refer to source files by absolute file names....Previously, "guix style PACKAGE" would end up modifying a file looked up
under the current directory since the location associated with PACKAGE
is usually a relative file name.
* guix/scripts/style.scm (absolute-location): New procedure.
(simplify-package-inputs): Use it.
| Ludovic Courtès |
2021-12-17 | guix hash: Add git serializer....* guix/scripts/hash.scm (git-hash): New procedure.
(%options): Use it.
* tests/guix-hash.sh: Test it.
* doc/guix.texi: Update.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| zimoun |
2021-12-17 | guix hash: Add 'serializer' option....* guix/scripts/hash.scm (%options): Deprecate 'recursive', add 'serializer'.
(%default-options): Add 'serializer'.
(nar-hash): New procedure.
(default-hash): New procedure.
(guix-hash)[file-hash]: Use them.
(show-help): Adjust.
* tests/guix-hash.scm: Adjust.
* doc/guix.texi: Update.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| zimoun |
2021-12-17 | guix hash: Support several files....* guix/scripts/hash.scm (guix-hash): Allow several files.
[file-hash]: Catch system-error.
[formatted-hash]: New procedure.
* tests/guix-hash.sh: Add test.
* doc/guix.texi (Invoking guix hash): Mention "one or more files".
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| zimoun |
2021-12-15 | offload: Autoload Guile-SSH....This halves the number of syscalls made by "guix offload" during startup
and delays loading of Guile-SSH until there are actually machines to
offload to.
* guix/scripts/offload.scm: Remove unused module imports. Autoload many
modules.
(check-ssh-zlib-support): New procedure.
(process-request): Call it when accepting.
(guix-offload): Remove 'zlib-support?' check, now moved to
'check-ssh-zlib-support'.
| Ludovic Courtès |
2021-12-15 | offload: Delay call to 'read-derivation-from-file'....This significantly reduces the amount of work done by "guix offload"
when there's no machine to offload to.
* guix/scripts/offload.scm (process-request): Add call to
'read-derivation-from-file', moved from...
(guix-offload): ... here.
| Ludovic Courtès |
2021-12-13 | Merge branch 'master' into core-updates-frozen | Ludovic Courtès |
2021-12-12 | challenge: Store item contents are returned in canonical order....This allows the 'delete-duplicates' call in 'differing-files' to have
the intended effect.
Before that, a "guix challenge" invocation with three builds of a store
item, two of which are identical, would lead 'differing-files' to not
print anything, as in this example:
$ ./pre-inst-env guix challenge python-numpy
/gnu/store/…-python-numpy-1.17.3 contents differ:
local hash: 07var0wn8fywxchldz5pjqpnlavrlbc8s81aqwsqyi0i7qlh6ka7
https://ci.guix.gnu.org/nar/lzip/…-python-numpy-1.17.3: 07var0wn8fywxchldz5pjqpnlavrlbc8s81aqwsqyi0i7qlh6ka7
https://bordeaux.guix.gnu.org/nar/lzip/…-python-numpy-1.17.3: 0cbl3q19bshb6ddz8xkcrjzkcmillsqii4z852ybzixyp7rg40qa
1 store items were analyzed:
- 0 (0.0%) were identical
- 1 (100.0%) differed
- 0 (0.0%) were inconclusive
With this change, 'differing-files' prints additional info as intended:
differing file:
/lib/python3.8/site-packages/numpy/distutils/fcompiler/__pycache__/vast.cpython-38.pyc
* guix/scripts/challenge.scm (archive-contents): Add tail call to
'reverse'.
(store-item-contents): Rewrite to use 'scandir' and recursive calls
instead of 'file-system-fold'.
| Ludovic Courtès |
2021-12-12 | challenge: Use SRFI-71 instead of SRFI-11....* guix/scripts/challenge.scm (port-sha256*, call-with-nar): Use SRFI-71.
| Ludovic Courtès |
2021-12-10 | Merge remote-tracking branch 'signed/master' into core-updates | Mathieu Othacehe |
2021-12-10 | environment: Suggestion code gracefully handles empty "/bin" directories....* guix/scripts/environment.scm (suggest-command-name): Handle the case
where 'scandir' returns #f.
| Ludovic Courtès |
2021-12-10 | shell: When using '-D -f', '-D' has no effect on remaining packages....Fixes <https://issues.guix.gnu.org/52093>.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>.
* guix/scripts/shell.scm (%options): In "--file" handler, add call to
'ensure-ad-hoc'.
* tests/guix-shell.sh: Add test.
| Ludovic Courtès |
2021-12-10 | shell: Fix '--file' description in '--help' output....Reported by pinoaffe on #guix.
* guix/scripts/shell.scm (show-help): Fix '--file' description.
| Ludovic Courtès |
2021-12-05 | Merge remote-tracking branch 'origin/master' into core-updates-frozen | Ricardo Wurmus |
2021-12-03 | guix system vm: Add --no-graphic CLI argument....It configures QEMU to use the tty it was started in for IO (as opposed to
opening a separate graphical window). This enables copy-pasting and
scrollback. Exit QEMU with C-a x.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Also add the
'-nographic' QEMU argument when called with #:graphic? #false.
* guix/scripts/system.scm (system-derivation-for-action): Propagate
the #:graphic? keyword arg.
(perform-action): Add and propagate the #:graphic? keyword arg.
(show-help): Add --no-graphic CLI arg.
(%options): Process the new --no-graphic CLI arg.
(process-action): Feed in the CLI arg through the #:graphic? keyword arg.
* doc/guix.texi (Invoking guix system): Add example to combine guix system and
invoking the vm start script into one command. Split the description of the
various options into separate paragraphs. Add a paragraph to describe
--no-graphic.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| Attila Lendvai |
2021-11-23 | style: Add '--dry-run'....* guix/scripts/style.scm (edit-expression/dry-run): New procedure.
(simplify-package-inputs): Add #:edit-expression parameter.
(%options, show-help): Add '--dry-run'.
(guix-style): Honor '--dry-run'.
| Ludovic Courtès |
2021-11-23 | Merge branch 'master' into core-updates-frozen | Ludovic Courtès |
2021-11-23 | guix graph: Show '-M' in '--help' output....* guix/scripts/graph.scm (show-help): Add -M shorthand.
| Ludovic Courtès |
2021-11-17 | Merge branch 'master' into core-updates-frozen | Ludovic Courtès |
2021-11-17 | scripts: home: Make ‘guix home import’ write home-configuration.scm....* guix/scripts/home.scm (process-command): Populate ‘home-configuration.scm’
in the destination directory instead of printing to stdout.
* doc/guix.texi (Declaring the Home Environment): Adjust accordingly.
(Invoking guix home): Likewise.
Suggested-by: Ludovic Courtès <ludo@gnu.org>
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| Xinglu Chen |
2021-11-17 | import: Replace texlive importer....* guix/import/texlive.scm (fetch-sxml, sxml->package): Remove procedures.
(tlpdb-file, tlpdb, files->directories, tlpdb->package): New procedures.
(string->license): Add case for lpplgpl license combination.
(guix-name): Remove COMPONENT argument.
(texlive->guix-package): Use new procedures.
(texlive-recursive-import): New procedure.
* guix/scripts/import/texlive.scm (show-help, %options): Remove --archive
option.
(guix-import-texlive): Adjust call of texlive->guix-package.
* doc/guix.texi (Invoking guix import): Update documentation.
| Ricardo Wurmus |
2021-11-14 | environment: Fix ‘--check’ with exported PS1 variable....If your .bashrc (unnecessarily) exports PS1 and you’re in a non-login
shell, Guix crashes:
user@popigai:~$ guix shell --check coreutils
guix shell: checking the environment variables visible from shell '/bin/bash'...
Backtrace:
14 (primitive-load "/home/user/.config/guix/current/bin/g…")
In guix/ui.scm:
2206:7 13 (run-guix . _)
2169:10 12 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
658:37 9 (thunk)
1320:8 8 (call-with-build-handler _ _)
1320:8 7 (call-with-build-handler #<procedure 7fe393b7c420 at g…> …)
In guix/status.scm:
800:4 6 (call-with-status-report _ _)
In guix/scripts/environment.scm:
951:12 5 (_)
In guix/store.scm:
2119:24 4 (run-with-store #<store-connection 256.99 7fe39627e500> …)
In guix/scripts/environment.scm:
521:35 3 (_ _)
In unknown file:
2 (string=? ("PS1" . "${debian_chroot:+($debian_chroot)…") …)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure string=: Wrong type argument in position 1 (expecting string): ("PS1" . "${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]${EXTRA}\\$ ")
user@popigai:~$
This is because the match pattern doesn’t expect `(vhash-assoc "PS1" actual)`
to return a pair.
* guix/scripts/environment.scm (validate-child-shell-environment): Change
match pattern to expect a pair.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Thiago Jung Bauermann |
2021-11-11 | import: cran: Allow imports of a specific version....* 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.
| Ludovic Courtès |
2021-11-11 | import: pypi: Allow imports of a specific version....* 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.
| Ludovic Courtès |
2021-11-08 | Merge remote-tracking branch 'origin/master' into core-updates-frozen | Efraim Flashner |
2021-11-07 | shell: Actually clean up the profile cache....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.
| Ludovic Courtès |
2021-11-07 | import: egg: Allow imports of a specific version....* 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>
| Xinglu Chen |
2021-11-07 | home: services: bash: Add ‘aliases’ field....* 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>
| Xinglu Chen |
2021-11-06 | environment: Suggest command upon 'execlp' failure....* 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'.
| Ludovic Courtès |