Commit graph

2372 commits

Author SHA1 Message Date
Herman Rimm
0950b726f2
scripts: style: Refactor order-packages.
* guix/scripts/style.scm (order-packages): Combine package-name and
package-version procedures into package-fields.
(format-whole-file): Do not sort copyright headers or module definition.

Change-Id: I5507bf8ed221f7017f972f0e0e64d149bea4854b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-09 18:20:41 +01:00
Herman Rimm
6b55b971c8
import: crate: Comment out missing dependencies.
* guix/import/crate.scm (package-names->package-inputs): Emit comments.
(make-crate-sexp): Make input into comment if missing.
(crate->guix-package): Take #:mark-missing? argument.
[dependency-name+missing+version+yanked]: Mark as missing.  Rename from
dependency-name+version+yanked.
[sort-map-dependencies]: Adjust.
[remove-missing+yanked-info]: Remove missing info.  Rename from
remove-yanked-info.
* guix/scripts/import/crate.scm (show-help): Explain --mark-missing.
(%options): Add mark-missing option.
(guix-import-crate): Pass mark-missing option as #:mark-missing?.
* doc/guix.texi (Invoking guix import): Document --mark-missing.
* tests/crate.scm ("crate->guix-package-marks-missing-packages"): Add
test.

Change-Id: I065d394e1c04fdc332b8f7f8b9fcbd87c14c6512
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-09 18:20:41 +01:00
Herman Rimm
48c5942a1e
scripts: import: crate: show-help: Reformat.
* guix/scripts/import/crate.scm (show-help): Reformat and reword
--allow-yanked message.

Change-Id: I43a50b201be86cd71f6ab51a7161e4009d4918bf
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-09 18:20:40 +01:00
Noé Lopez
1ec7bf9f29
pack: Support localstatedir in AppImage format.
* guix/scripts/pack.scm (self-contained-appimage): Support localstatedir
option.

Change-Id: I296b3d3e442aa90f36de62a9b23aba4a2c3de9a0
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-01-24 23:43:35 +01:00
Ludovic Courtès
0aa45f1854
home: Define ‘%base-home-services’.
* gnu/home.scm (%base-home-services): New variable.
(<home-environment>)[services]: Change default to ‘%base-home-services’.
* guix/scripts/home/import.scm (manifest+configuration-files->code): Use
‘%base-home-services’ by default.
* tests/home-import.scm (match-home-environment-no-services)
(match-home-environment-transformations)
(match-home-environment-no-services-nor-packages)
(match-home-environment-bash-service)
(match-home-environment-bash-service-with-alias): Adjust accordingly.
* doc/he-config-bare-bones.scm: Use ‘%base-home-services’.
* doc/guix.texi (Declaring the Home Environment): Add index entry for
‘%base-home-services’.

Change-Id: Id95ede62b97a976aad138bfc4b63fc0bdf37c7de
2025-01-16 22:32:11 +01:00
Ludovic Courtès
a6642650a7
reconfigure: Make ‘load-system-for-kexec’ errors non-fatal.
Partially fixes <https://issues.guix.gnu.org/75215>.

* guix/scripts/system/reconfigure.scm (load-system-for-kexec): Catch
exceptions in the gexp.  Report them outside.

Reported-by: Luis Guilherme Coelho <lgcoelho@disroot.org>
Change-Id: Iebcdc92e29b8623a55967d58a4f353abab01631a
2025-01-07 17:44:12 +01:00
Ludovic Courtès
d8b7259197
reconfigure: Do not pass KEXEC_FILE_DEBUG.
This flag is unsupported in Linux 6.6 and causes ‘kexec_file_load’ to
fail with EINVAL.

Fixes <https://issues.guix.gnu.org/75211>.

* guix/scripts/system/reconfigure.scm (kexec-loading-program): Remove
KEXEC_FILE_DEBUG.
* guix/build/syscalls.scm (KEXEC_FILE_DEBUG): Add comment.

Suggested-by: nathan <nathan_mail@nborghese.com>
Reported-by: Simen Endsjø <contact@simendsjo.me>
Change-Id: Ia48be7f4cfa9c6352908e4bea6472cd648f866ed
2025-01-07 17:44:12 +01:00
Ludovic Courtès
1305f78d05
reconfigure: Support loading the system for kexec reboot.
This allows rebooting straight into the new system with ‘reboot -k’.

* guix/scripts/system/reconfigure.scm (kexec-loading-program)
(load-system-for-kexec): New procedures.
* gnu/tests/reconfigure.scm (run-kexec-test): New procedure.
(%test-upgrade-kexec): New variable.
* guix/scripts/system.scm (perform-action): Add #:load-for-kexec?.
Call ‘load-system-for-kexec’.
(show-help, %options): Add ‘--no-kexec’.
(%default-options): Add ‘load-for-kexec?’.
(process-action): Honor it and pass it to ‘perform-action’.
* gnu/machine/ssh.scm (deploy-managed-host): Add call to
‘load-system-for-kexec’.
* doc/guix.texi (Invoking guix system): Document it.

Change-Id: I86d11f1c348e4359bc9e73c86e5aebff60fe875c
2024-12-28 22:47:34 +01:00
Ludovic Courtès
e16cdcf37d
time-machine: Add ‘--no-check-certificate’.
This can be tested with:

  guix shell libfaketime -- faketime 2019-01-01 \
    guix time-machine -q --no-check-certificate

* guix/scripts/time-machine.scm (%options, show-help): Add
‘--no-check-certificate’.
(%default-options): Add ‘verify-certificate?’ key.
(guix-time-machine): Honor it.

Change-Id: I25a29d03d4df78d1618c6a416ec85fd8e90fec6c
2024-12-25 23:51:10 +01:00
Ludovic Courtès
7d235a6799
pull: Add ‘--no-check-certificate’.
This can be tested with:

  guix shell libfaketime -- faketime 2019-01-01 \
    guix pull -q --no-check-certificate -p /tmp/p

* guix/scripts/pull.scm (%options, show-help): Add
‘--no-check-certificate’.
(%default-options): Add ‘verify-certificate?’ key.
(guix-pull): Honor it.
* doc/guix.texi (Invoking guix pull): Document it.

Change-Id: Ia9d7af1c64156b112e86027fb637e2e02dae6e3c
2024-12-25 23:51:10 +01:00
Ludovic Courtès
fc438ef675
guix download: Honor ‘--no-check-certificate’ for ‘--git’.
Until now ‘--no-check-certificate’ had no effect when combined with
‘--git’.  This can be tested with:

  guix shell libfaketime -- faketime 2019-01-01 \
    guix download --no-check-certificate --git \
    https://git.savannah.gnu.org/git/shepherd.git

* guix/scripts/download.scm (git-download-to-file): Add #:verify-certificate?
and honor it.
(git-download-to-store*): Likewise.
(add-git-download-option): Likewise.
(%options): Likewise.

Change-Id: Ib3905398199d814a02319ed3328eb8a4ed219bd5
2024-12-25 23:51:10 +01:00
Richard Sent
f1c2681542
deploy: Add ‘--expression’.
* guix/scripts/deploy.scm (show-help): Add help.
(%options): Add -e and --expression.
(guix-deploy): Use expression and check for invalid flag combinations.

Change-Id: I200c9ff0c9a8c686efff4a21cd33c10429f3c73e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-23 20:45:32 +01:00
Richard Sent
5c54300b78
weather: Reword the help message for the expression flag.
* guix/scripts/weather.scm (show-help): Reword help.

Change-Id: I670dc0c8f89b81e2f7f8b5d7a9a05f74b3ac9cdd
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-23 20:45:32 +01:00
Brian Kubisiak
3e096a6bab
environment: Suppress all output with --verbosity=0
* guix/scripts/environment.scm (guix-environment*): Call
'with-status-verbosity' earlier.

Fixes: <https://issues.guix.gnu.org/71298>
Change-Id: I69c7dd1058b44d587312d957312a130a8703cfca
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 13:23:30 +01:00
Maxim Cournoyer
dc3b526bad
scripts/substitute: Refine 'updating substitutes' message.
* guix/scripts/substitute.scm (process-query): Attempt to precise the 'update
substitutes' message.

Suggested-by: Tobias Geerinckx-Rice <me@tobias.gr>
Reported-by: Felix Lechner <felix.lechner@lease-up.com>
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I7b3f93f32b73a6a6175a035a09ab51a6e74e384b
2024-12-18 16:27:09 +09:00
Brian Kubisiak
a945eb151a
pack: Allow cross-compiling with '--relocatable'.
* guix/scripts/pack.scm (c-compiler-compiler): Remove exception when
cross-compiling and always build gexp->script for the host.
[toolchain]: Use standard-cross-packages when cross-compiling.
[search-paths]: Use package-search-paths instead of
package-native-search-paths when cross-compiling.
[run]: Use cc-for-target and strip-for-target.

Change-Id: I5503e48b3394fdfee06999f8d1ad82f5f0d9af96
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-16 00:21:06 +01:00
Ludovic Courtès
46a8922105
guix build: Last argument of ‘dependents’ is optional.
* guix/scripts/build.scm (dependents): Make ‘max-depth’ optional.
Improve docstring.

Change-Id: Ibeffcf15297ecba3d4000b3adb4e3bc7853f6957
2024-12-12 23:23:34 +01:00
Janneke Nieuwenhuizen
5cb84f2013
system: Add "installer" sub-command.
* guix/scripts/system/installer.scm: New file.
* Makefile.am (MODULES)[ENABLE_INSTALLER]: Register it.
(MODULES_NOT_COMPILED)[!ENABLE_INSTALLER]: Likewise.
* guix/scripts/system.scm (show-help): Add help for "installer" sub-command.
(actions): Register "installer".
(guix-system): Invoke `guix-system-installer' sub-command.
* doc/guix.texi (Invoking guix system): Document it.
* gnu/installer.scm (run-installer): Remove "./pre-inst env".

Change-Id: I5a05b941c060682c17d45d871df3cf34e3f8643a
2024-12-03 08:26:03 +01:00
Arne Babenhauserheide
62f8399e6a
pack: Add ‘--file=FILE’ with the same meaning as for ‘guix build’.
* guix/scripts/pack.scm (%options): add --file=FILE, but no
  shorthand (that’s already taken for format).
* doc/guix.texi (Invoking guix pack): Document it.

Change-Id: I87797fccdf218ead3b7f471a84034e8a8d566245
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-02 11:57:13 +01:00
Ludovic Courtès
858dd7e721
etc: Add upgrade manifest.
* guix/scripts/build.scm (dependents): Export.
* etc/upgrade-manifest.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.

Change-Id: I1b2a2ebd09e559c68da9f25772bf33caacb4c031
2024-12-01 20:14:16 +01:00
Ludovic Courtès
c6050cce28
guix build: Validate that the file passed to ‘-m’ returns a manifest.
* guix/scripts/build.scm (options->things-to-build)[ensure-manifest]:
New procedure.
Use it.

Change-Id: If64c483d7079f441a296d5bd4e06e67f44cbb7bf
2024-12-01 20:14:16 +01:00
Ludovic Courtès
6b14eb3402
guix build: Add ‘--dependents’.
* guix/scripts/build.scm (show-help, %options): Add ‘--dependents’.
(dependents): New procedure.
(options->things-to-build): Add ‘store’ parameter; honor ‘dependents’
option.
[for-type]: Handle ‘dependents’ type.
(options->derivations): Update call to ‘options->things-to-build’.
* tests/guix-build.sh: Add test.
* doc/guix.texi (Additional Build Options): Document ‘--dependents’.
(Invoking guix refresh): Cross-reference it.
* doc/contributing.texi (Submitting Patches): Mention it.

Change-Id: I00b6d5831e1f1d35dc8b84a82605391d5a8f417c
2024-12-01 20:14:15 +01:00
Ludovic Courtès
4b5dae8def
packages: Factorize ‘all-packages’.
* gnu/packages.scm (all-packages): New procedure.
* etc/source-manifest.scm (all-packages): Remove.
* guix/scripts/graph.scm (all-packages): Remove.
* guix/scripts/refresh.scm (all-packages): Remove.
* guix/scripts/weather.scm (all-packages): Remove.

Change-Id: I6072952c4b877b541037ce86402cfb7744eeb0a0
2024-12-01 20:14:15 +01:00
Ludovic Courtès
a633422371
guix build: Add ‘--development’ option.
* guix/scripts/build.scm (show-help, %options): Add ‘-D’.
(options->things-to-build): Change ‘append-map’ to a loop.  Honor ‘-D’.
* tests/guix-build.sh: Add test.
* doc/guix.texi (Additional Build Options): Document it.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I99227aadfe861e43c001a4872292bd687b37f5d4
2024-12-01 20:14:15 +01:00
Sebastian Dümcke
ccf72d5074
pack: Add support for AppImage pack format.
* guix/scripts/pack.scm (self-contained-appimage): New procedure.
(%formats, show-formats): Add it.
(guix-pack): Honor it.
* doc/guix.texi: Document AppImage pack.
* tests/pack.scm ("appimage", "appimage + localstatedir"): New tests.

Co-authored-by: Noé Lopez <noelopez@free.fr>
Change-Id: I33ebfec623cff1cfcd6f029d2d3054c23ab1949a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-23 16:30:17 +01:00
zero@fedora
2d3bf6a2a3
import: cpan: Support recursive imports.
* guix/import/cpan.scm (cpan-module->sexp): Return two values.
(cpan->guix-package): Add #:version.  Return two values.
(cpan-recursive-import): New procedure.
* guix/scripts/import/cpan.scm (show-help, %options): Add ‘-r’.
(guix-import-cpan): Adjust accordingly.

Change-Id: Id167c7ddd079f4e04650ce7cc1692a9de36cd8fe
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-23 16:23:19 +01:00
Ludovic Courtès
2ac93b9b5c
describe: Add hyperlinks for codeberg.org commits.
* guix/scripts/describe.scm (%vcs-web-views): Add “codeberg.org”.

Change-Id: I6749649f9c73434ba6ed424d049e50e6741b0a11
2024-11-14 15:36:02 +01:00
Janneke Nieuwenhuizen
046d6d9f8e
guix system: When installing the Hurd, create essential devices.
* guix/scripts/system.scm (install): When installing the Hurd, invoke
`make-hurd-device-nodes'.

Change-Id: If84d5fe0b5bf4a93452f0b5241650f325d583543
2024-11-11 07:28:32 +01:00
Janneke Nieuwenhuizen
4f94f07b1f
reconfigure: Use native bootloader package for running the installer.
This fixes running grub-install when using guix system init --target.

* guix/scripts/system/reconfigure.scm (install-bootloader): Use native package
when invoking install-bootloader-program.

Change-Id: I48d80a8dff866ada3625d827dd3036fb966eee9a
2024-11-11 07:28:29 +01:00
Ludovic Courtès
23ab6fc29f
environment: Gracefully handle preexistence of /bin/cc in FHS.
* guix/scripts/environment.scm (setup-fhs): When /bin/cc already exists,
keep it.

Reported-by: Marco Fortina <marco_fortina@hotmail.it>
Change-Id: I73d39d2aa6fbafd236061a0e3b8d1fe327b2bb19
2024-10-24 14:50:08 +02:00
Ludovic Courtès
6d8107c967
shell: Enable caching when using deterministic package transformations.
Until now, using any package transformation would disable the automatic
GC root creation and caching in ‘guix shell’.  This change introduces a
finer-grain distinction: a command like:

  guix shell --tune inkscape

is now subject to caching, whereas:

  guix shell --with-latest=inkscape inkscape

remains non-cacheable.

* guix/transformations.scm (%transformations-with-external-dependencies):
New variable.
(cacheable-transformation-option-key?): New procedure.
* guix/scripts/shell.scm (profile-cached-gc-root): In the
‘transformation-option-key?’ clause, call ‘loop’ when
‘cacheable-transformation-option-key?’ returns true.

Change-Id: I847b661dfea20ecf851db2023a5c7ea8c5b5ca7c
2024-10-22 00:27:49 +02:00
Ludovic Courtès
40a0b440ba
guix build: Avoid “could not determine …” warning when unnecessary.
This is a followup to 0629af7c2a.

* guix/scripts/build.scm (guix-build): Move ‘urls’ definition
to (assoc-ref opts 'log-file?) case so that the “could not determine
current substitute URLs” warning is not displayed when ‘urls’ is unused.

Change-Id: I9434621b00a80bdbcf54d2a46d1a1e5f49cc7669
2024-10-15 18:40:08 +02:00
Aaron Covrig
6d0a86d22d
style: Fix cli flag typo.
* guix/scripts/style.scm (%options): Fix cli flag expanded name typo.

Change-Id: I6abfb5fd4ba0dc9b58f368437d10ccbe63ae28fa
2024-10-14 22:46:51 +08:00
Tomas Volf
db1a1dc0b2
time-machine: Print profile path if no command is given.
Instead of warning, print the profile path of the cached-channel-instance.

* guix/scripts/time-machine.scm (guix-time-machine)[not command-line]: Print
the profile directory.
(show-help): Adjust usage message.
* doc/guix.texi (Invoking guix time-machine): Document it.

Change-Id: Id2c1ded514e6c5af45af9008ad1ef91beb509177
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-07 12:51:23 +02:00
Ludovic Courtès
ed21dd9f84
locate: Move to ‘main’ category.
That way ‘locate’ is listed in the same category as ‘search’, ‘install’,
etc., which is more consistent.

* guix/scripts/locate.scm (guix-locate): Move to ‘main’ category.

Change-Id: I7f86f1124fedc2c7a9166fe191036530c382bfaf
2024-10-04 17:23:12 +02:00
Tobias Geerinckx-Rice
26942d67b7
Add some missing header comment header comments.
* gnu/packages/minetest.scm: Add the ‘GNU Guix’ header comment.
* gnu/packages/notcurses.scm: Likewise.
* gnu/packages/presentation.scm: Likewise.
* gnu/packages/solidity.scm: Likewise.
* guix/build/minetest-build-system.scm: Likewise.
* gnu/packages/vnc.scm: Add missing ‘;’.
* guix/scripts/import/crate.scm: Remove leading newline.

Change-Id: I5294e6067b9348f2929d823a07d4ec335eaa5ecd
2024-09-08 02:00:00 +02:00
Ludovic Courtès
0629af7c2a
guix build: ‘--log-file’ honors the configured substitute URLs.
* guix/scripts/build.scm (guix-build): When defining ‘urls’, add
‘substitute-urls’ call.
* doc/guix.texi (Additional Build Options): Adjust ‘--log-file’
documentation.

Change-Id: I40f0647efe64ba3a63a6379b8da80b0da8910f48
2024-09-06 11:46:23 +02:00
Herman Rimm
c4ce313052
scripts: style: Add 'alphabetical-sort' option.
* guix/scripts/style.scm (show-help): Describe option.
(order-packages): Add procedure.
(format-whole-file): Add 'order?' argument.
(%options): Add 'alphabetical-sort' option.
(guix-style): Alphabetically order packages in files.
* tests/guix-style.sh: Test alphabetical ordering.
* doc/guix.texi (Invoking guix style): Document option.

Change-Id: I4aa7c0bd0b6d42529ae7d304587ffb10bf5f4006
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-09-03 13:59:33 +02:00
Tobias Geerinckx-Rice
a3c0f245be
import: Order importers alphabetically in ‘--help’ output.
I'd rather keep the list sorted than call SORT at run time.
We can still switch if committers remain incorrigible.

* guix/scripts/import.scm (importers): Sort.

Change-Id: If358b2d5de2912a33989d776476e9cf4d0b80537
2024-08-25 02:00:00 +02:00
Ludovic Courtès
fa70c14155
substitute: Reopen connection upon “Error in the push function” from GnuTLS.
This works around an occasional issue where substitution stops abruptly
due to “Error in the push function” from GnuTLS, as reported at
<https://issues.guix.gnu.org/71238> by Richard Sent.

* guix/scripts/substitute.scm (call-with-cached-connection): Add
‘error/push-error’ and ‘error/pull-error’ to the list of gnutls-error
values for which the connection is reopened.

Change-Id: Icf079dd10b16739f62fee15bc3d90bab77110576
2024-08-31 19:06:37 +02:00
Maxim Cournoyer
f2748d6357
refresh: Import %final-inputs from (gnu packages base).
* guix/scripts/refresh.scm: Import %final-inputs from (gnu packages base).

Change-Id: Ida99a88fd3305a7971ab7951a15ee5ffde5ddb56
2024-08-31 10:44:47 +02:00
Simon Tournier
d007b64356
scripts: hash: Handle repository with different VCS folders.
Fixes <https://issues.guix.gnu.org/issue/65979>.

* guix/hash.scm (%vcs-directories): New variable.
(vcs-file?): Add optional argument for passing VCS kind of the
file/repository.
(file-hash*): Adjust accordingly.
(vcs-file-predicate): New procedure and export it.
* guix/scripts/hash.scm (guix-hash)[file-hash]: Use it.

Change-Id: I8e286c3426ddefd664dc3a471d5a09e309824faa
2024-07-23 16:27:27 +02:00
Ludovic Courtès
0553c44471
guix build: Take ‘--system’ into account together with ‘-S’.
* guix/scripts/build.scm (options->derivations)[compute-derivation]:
Pass ‘system’ to ‘package-source-derivation’.
* tests/guix-build.sh: Test ‘-S’ together with ‘-s’.

Change-Id: If35f116285dd9caaf939221163ad0ba831eea993
2024-07-18 17:31:18 +02:00
Lars Bilke
7893b32ef6
pack: Create /tmp in Apptainer images.
Related to <https://bugs.gnu.org/37161> and
<https://git.savannah.gnu.org/cgit/guix.git/commit/?id=7979a287f8eb84cbbfa44629951572408939a756>.

* guix/scripts/pack.scm (squashfs-image)[build]: Add /tmp to the set of
directories created.
* tests/pack.scm ("squashfs-image + localstatedir"): Check for /tmp.

Change-Id: I576aaa6ba8cb8478acf4c3144d492ae5caf411ca
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-07-10 16:00:36 +02:00
Richard Sent
69089674bb
import: go: Fix indentation in help message.
* guix/scripts/import/go.scm (show-help) <recursive>: Indent second line.

Change-Id: Iad096231e26ed4e0e1c584f92e43f2695a2d8682
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2024-07-01 21:57:13 +01:00
Ludovic Courtès
7e00fb9f31
substitute: Don’t keep cache entries more than a few days.
Experience has shown that keeping too many entries increases disk usage
and, more importantly, leads to long delays when cleaning up the cache,
measured in minutes on slow or busy HDDs with hundreds of thousands of
cache entries, as is common on build machines.  In those cases, the cost
of the cache outweighs its benefit.

* guix/scripts/substitute.scm (%narinfo-expired-cache-entry-removal-delay):
Reduce to 5 days.
(cached-narinfo-expiration-time)[max-ttl]: Reduce to 2 days.

Change-Id: Iab212f572ee9041be61716423a3c014f93fe81ed
2024-06-13 11:38:24 +02:00
Richard Sent
3e87b207ce
file-systems: Add support for mounting CIFS file systems
* gnu/build/file-systems (canonicalize-device-name): Do not attempt to resolve
CIFS formatted device specifications.
(mount-file-systems): Add mount-cifs nested function.
* gnu/machine/ssh.scm (machine-check-file-system-availability): Skip checking
for CIFS availability, similar to NFS.
* guix/scripts/system.scm (check-file-system-availability): Likewise.

Change-Id: I182e290eba64bbe5d1332815eb93bb68c01e0c3c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-04 12:08:34 +02:00
Ludovic Courtès
e8ab4ccaa7
style: Fix conversion of ‘unquote-splicing’ by ‘-S arguments’.
* guix/scripts/style.scm (unquote->ungexp): Add missing comma for
‘ungexp-splicing’.
* tests/style.scm ("gexpify arguments, substitute-keyword-arguments +
unquote-splicing"): New test.

Change-Id: I17dcdd9b4812d54ddba1137e369360706b137bb4
2024-06-03 22:58:52 +02:00
Ludovic Courtès
cbac0b1db0
environment: Fix type error with ‘-C’ when ‘getpwuid’ fails.
Fixes a bug with ‘guix shell -C …’ in cases where ‘getpwuid’
returns #f (for example because nscd isn’t running) and
‘user’ is #f.

* guix/scripts/environment.scm (launch-environment/container): Use
‘name’ when building the ‘directory’ value, not ‘user’ since it can be #f.

Change-Id: I5da807d982a1edbb4122ac29b5a1e5fc4b0ce1b7
2024-05-25 15:10:11 +02:00
Jelle Licht
0685042c46
import: Add binary npm importer.
* guix/scripts/import.scm: (importers): Add "npm-binary".
* doc/guix.texi (Invoking guix import): Document npm-binary importer.
* guix/import/npm-binary.scm: New file.
* guix/scripts/import/npm-binary.scm: New file.
* tests/npm-binary.scm: New file.
* Makefile.am: Add them.

Co-authored-by: Timothy Sample <samplet@ngyro.com>
Co-authored-by: Lars-Dominik Braun <lars@6xq.net>

Change-Id: I98a45068cf5b9c42790664cc743feaa7ac76f807
2024-05-19 16:05:00 +02:00