summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Expand)Author
2022-06-26substitute: Use SRFI-71 instead of SRFI-11....* guix/scripts/substitute.scm (display-narinfo-data) (open-connection-for-uri/cached) (process-substitution): Use SRFI-71 instead of SRFI-11. Ludovic Courtès
2022-06-23guix system: Inline menu-entries in to bootcfg in perform-action....This avoids an exception when generating images, where the reading of boot parameters fails. * guix/scripts/system.scm (perform-action): Inline menu-entries in to bootcfg. Christopher Baines
2022-06-22refresh: Repurpose '-L' for '--load-path'....This incompatible change fixes an inconsistency with other commands where '-L' is short for '--load-path'. * guix/scripts/refresh.scm (%options): Add --load-path option from %STANDARD-BUILD-OPTIONS. Remove #\L shortcut for --list-updaters, and remove --load-path option that lacked the #\L shortcut. (show-help): Update accordingly. * doc/guix.texi (Invoking guix refresh): Update accordingly. Ludovic Courtès
2022-06-22style: Keep values next to their keyword....This ensures we print '#:key value' rather than insert a newline between '#:key' and 'value' as was the case before. * guix/scripts/style.scm (pretty-print-with-comments)[print-sequence]: When ITEM is a keyword, loop with FIRST? = true. * tests/style.scm: Add test. Ludovic Courtès
2022-06-19challenge: Colorize output....* guix/scripts/challenge.scm (good-news, bad-news): New procedures. (summarize-report, summarize-report-list): Use them and 'highlight'. Ludovic Courtès
2022-06-16shell: Fix '--export-manifest' for cached profiles and when '-p' is used....Fixes <https://issues.guix.gnu.org/55521>. * guix/scripts/shell.scm (export-manifest): When computing 'manifest', honor the 'profile key. * tests/guix-shell-export-manifest.sh: Add test. Ludovic Courtès
2022-06-16shell: Do not auto-detect manifest when '-p' is used....Previous, "guix shell -p /path/to/profile" would have manifest/guix.scm auto-detection turned on. * guix/scripts/shell.scm (auto-detect-manifest)[options-contain-payload?]: Return #t for 'profile. Ludovic Courtès
2022-06-15refresh: Switch to SRFI-71....* guix/scripts/refresh.scm (update-package): Use SRFI-71 'let' instead of SRFI-11 'let-values'. Ludovic Courtès
2022-06-15challenge: When using '--diff', do not attempt to chmod symlinks....This is a followup to 2a2856d5ccd9a9b7df8a94333a277b971a39b150. * guix/scripts/challenge.scm (make-directory-writable): Do not call 'make-file-writable' on symlinks. Ludovic Courtès
2022-06-15import: Add hex.pm importer....hex.pm is a package repository for Erlang and Elixir. * guix/scripts/import.scm (importers): Add "hexpm". * guix/scripts/import/hexpm.scm, guix/import/hexpm.scm, guix/hexpm-download.scm: New files. * guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of fetch methods. * guix/upstream.scm (package-update/hexpm-fetch): New function. (%method-updates) Add it. * Makefile.am: Add them. Hartmut Goebel
2022-06-15pull: Tweak cache directory validation code....This is a followup to 7c52cad0464175370c44bd4695e4c01a62b8268f. * guix/scripts/pull.scm (guix-pull): Move cache directory validation code to... (validate-cache-directory-ownership): ... here. New procedure. Use SRFI-71 instead of SRFI-11. Use 'formatted-message' for the error message, with ASCII quotation marks, and use Texinfo markup for '&fix-hint'. Ludovic Courtès
2022-06-12pull: Fix typo in error message....* guix/scripts/pull.scm (guix-pull): Report the right user name/ID. Tobias Geerinckx-Rice
2022-06-13challenge: Actually delete nars that have been extracted....Fixes <https://issues.guix.gnu.org/55809>. Reported by Vagrant Cascadian <vagrant@reproducible-builds.org>. * guix/scripts/challenge.scm (make-directory-writable): New procedure. (call-with-mismatches)[restore-file*]: New procedure. Use it instead of 'restore-file'. Ludovic Courtès
2022-06-05pull: Fail if cache directory ownership is suspect....New users frequently run ‘sudo guix pull’ which breaks subsequent unprivileged ‘guix pull’s until manually fixed with chmod -R. * guix/scripts/pull.scm (guix-pull): Fail if the cache directory (or its innermost extant parent) is not owned by the user pulling the Guix, with a hint about ‘sudo -i’. Tobias Geerinckx-Rice
2022-06-06packages: Add 'specifications->packages'....* gnu/packages.scm (specifications->packages): New procedure. * guix/scripts/home/import.scm (manifest+configuration-files->code): Use it. * tests/home-import.scm (match-home-environment-no-services) (match-home-environment-no-services-nor-packages) (match-home-environment-bash-service) (match-home-environment-bash-service-with-alias): Adjust 'packages' field accordingly. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Antero Mejr
2022-05-29guix system: Don't suggest reconfiguration during reconfiguration....* guix/scripts/system.scm (process-action): Add 'reconfigure to the warning's guard clause. Reported by johnjaye on #guix. Tobias Geerinckx-Rice
2022-06-04guix home: Add 'edit' sub-command....* guix/scripts/home/edit.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/home.scm (show-help): Add "edit". (process-command): Handle it. (guix-home): Add it. * po/guix/POTFILES.in: Add 'guix/scripts/home/edit.scm'. * doc/guix.texi (Invoking guix home): Document it. Ludovic Courtès
2022-06-04guix system: Add 'edit' sub-command....* guix/scripts/system/edit.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/system.scm (show-help): Mention "edit". (actions): Add it. (process-command): Handle it. * doc/guix.texi (Invoking guix system): Document it. * po/guix/POTFILES.in: Add guix/scripts/system/edit.scm. Ludovic Courtès
2022-06-04edit: Extract 'spawn-editor' procedure....* guix/scripts/edit.scm (spawn-editor): New procedure, with code from... (guix-edit): ... here. Use it. Ludovic Courtès
2022-06-01shell: '--export-manifest -D x -D y' generates a valid manifest....* guix/scripts/shell.scm (manifest->code*): Add missing 'list' in generated 'concatenate-manifests' call. * tests/guix-shell-export-manifest.sh: Add test. Ludovic Courtès
2022-05-29scripts/import: Use pretty printer from (guix scripts style)....* guix/scripts/import.scm (guix-import): Use pretty-print-with-comments. (newline-rewriting-port): Remove procedure. Ricardo Wurmus
2022-05-27substitute: Check for --help or --version options early....Running `guix archive --authorize` sets /etc/guix/acl to 600 via with-atomic-file-output via mkstemp!. Then running `guix substitute --help/--version` fails on "permission denied". While "guix substitute" is an internal tool, the options --help and --version exist and you should be able to run those from the command line. * guix/scripts/substitute.scm (guix-substitute): Earlier check for --help or --version. Signed-off-by: Ludovic Courtès <ludo@gnu.org> yarl-baudig@mailoo.org
2022-05-26guix package: Sort search results by package version....Fixes <https://issues.guix.gnu.org/55480>. Reported by Greg Hogan <code@greghogan.com>. * guix/scripts/package.scm (find-packages-by-description): When PACKAGE1 and PACKAGE2 have the same name, sort by version. Ludovic Courtès
2022-05-25Move (gnu platform) and (gnu platforms ...) to guix/....* gnu/platform.scm: * gnu/platforms/arm.scm: * gnu/platforms/hurd.scm: * gnu/platforms/mips.scm: * gnu/platforms/powerpc.scm: * gnu/platforms/riscv.scm: * gnu/platforms/s390.scm: * gnu/platforms/x86.scm: Move to guix/. * Makefile.am: * doc/guix.texi (Porting to a New Platform): * etc/release-manifest.scm: * gnu/ci.scm: * gnu/image.scm: * gnu/local.mk: * gnu/packages/bioinformatics.scm: * gnu/packages/bootstrap.scm: * gnu/packages/cross-base.scm: * gnu/packages/instrumentation.scm: * gnu/packages/linux.scm: * gnu/system/image.scm: * gnu/system/images/hurd.scm: * gnu/system/images/novena.scm: * gnu/system/images/pine64.scm: * gnu/system/images/pinebook-pro.scm: * gnu/system/images/rock64.scm: * guix/scripts/build.scm: * guix/scripts/system.scm: * guix/self.scm: Update (gnu platform...) to (guix platform...). Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Josselin Poiret
2022-05-23scripts: package: Transform before creating manifest entries....* guix/scripts/package.scm (options->installable): Add TRANSFORM argument, to be able to directly transform the new packages before creating their manifest entries. (process-actions): Remove transform-entry, and step3, transforming directly in step2. * tests/guix-package.sh: Add test. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Josselin Poiret
2022-05-22scripts: build: Highlight the current system with --list-systems....* guix/scripts/build.scm (list-systems): Highlight it. Mathieu Othacehe
2022-05-22scripts: Add --list-systems and --list-targets options....Also factorize the --system and --target build options. Check that the passed system and target arguments are known platforms. * doc/guix.texi (Additional Build Options): Document the new --list-systems and --list-targets options. * guix/scripts/build.scm (show-cross-build-options-help, show-emulated-build-options-help, list-systems, list-targets): New procedures. (%standard-cross-build-options, %standard-emulated-build-options): New variables. (show-help): Remove --system and --target entries and use show-cross-build-options-help and show-emulated-build-options-help procedures instead. (%options): Remove --system and --target entries and use %standard-cross-build-options and %standard-emulated-build-options variables instead. * guix/scripts/archive.scm (show-help, %options): Adapt them. * guix/scripts/environment.scm: Ditto. * guix/scripts/graph.scm: Ditto. * guix/scripts/pack.scm: Ditto. * guix/scripts/pull.scm: Ditto. * guix/scripts/size.scm: Ditto. * guix/scripts/weather.scm: Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Mathieu Othacehe
2022-05-22import: Add Elm importer....* guix/import/elm.scm, guix/scripts/import/elm.scm: New files. * Makefile.am (MODULES): Add them. * guix/scripts/import.scm (importers): Add "elm". * doc/guix.texi (Invoking guix import): Document Elm importer. * doc/contributing.texi (Elm Packages): Mention it. * tests/elm.scm ("(guix import elm)"): New test group. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Philip McGrath
2022-05-20guix: Remove unused import....* guix/scripts/pull.scm: Do not import with-file-lock/no-wait from (guix build syscalls). Ricardo Wurmus
2022-04-29guix system: Highlight search results....This is a followup to 5e0c3479759047311b6a518fd0bc512b232f201a. * guix/scripts/system/search.scm (guix-system-search): Pass #:regexps parameter to 'display-search-results'. Ludovic Courtès
2022-04-29publish: Send uncached narinfo replies from the main thread....Fixes <https://issues.guix.gnu.org/54723>. Reported by Guillaume Le Vaillant <glv@posteo.net>. Regression introduced in f743f2046be2c5a338ab871ae8666d8f6de7440b. With commit f743f2046be2c5a338ab871ae8666d8f6de7440b, responses to pipelined GETs would end up being written concurrently by many threads. Thus the body of those responses could be interleaved and garbled. * guix/scripts/publish.scm: Revert f743f2046be2c5a338ab871ae8666d8f6de7440b. * tests/publish.scm ("/*.narinfo pipeline"): New test. Ludovic Courtès
2022-04-26scripts: pack: Fix typo....* guix/scripts/pack.scm (compressor-extenstion): Fix typo. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Alex Griffin
2022-04-23pack: Fix match error for multi-packages deb packs....* guix/scripts/pack.scm: Remove duplicated copyright line. (debian-archive)[single-entry]: Match one or anything, not one or zero. Reported-by: jgart <jgart@dismail.de> Maxim Cournoyer
2022-04-19ui: Highlight package and service search results....* guix/ui.scm (package->recutils): Add #:highlighting parameter and use it. (display-search-results): Add #:regexps parameter; call 'colorize-full-matches' and pass #:highlighting. * guix/scripts/package.scm (process-query): Pass #:regexps to 'display-search-results'. * guix/scripts/home.scm (search): Likewise. * guix/scripts/system/search.scm (service-type->recutils): Add #:highlighting parameter and use it. Ludovic Courtès
2022-04-19ui: Highlight important bits in recutils output....* guix/scripts/system/search.scm (service-type->recutils): Highlight the value of the 'name' field. * guix/ui.scm (package->recutils): Likewise for 'name' and 'version'. Ludovic Courtès
2022-04-14publish: Support systemd-style socket activation....* guix/scripts/publish.scm (systemd-socket): New procedure. (guix-publish): Add 'style' variable. Adjust startup message depending on whether STYLE is 'systemd. * doc/guix.texi (Invoking guix publish): Mention socket activation. Ludovic Courtès
2022-04-14publish: Use SRFI-71 instead of SRFI-11....* guix/scripts/publish.scm (make-request-handler): Use 'let' instead of 'let-values'. Ludovic Courtès
2022-04-14style: Correctly read dots in pairs and improper lists....Until now dots were read as symbols. * guix/scripts/style.scm (read-with-comments)[dot]: New variable. [dot?, reverse/dot]: New procedures. Use 'reverse/dot' instead of 'reverse' when reading lists. * tests/style.scm ("read-with-comments: dot notation") ("((a . 1) (b . 2))", "(a b c . boom)"): New tests. Ludovic Courtès
2022-04-11reconfigure: Fix typo on 'live-service-transient?'....Fix typo introduced in e25eca35ff04e4234d0376fbb9a8e146869772c8. * guix/scripts/system/reconfigure.scm (running-services): Add question mark to 'live-service-transient?. Ludovic Courtès
2022-04-10services: herd: Adjust to <live-service> changes....This is a followup to a2c759c8304c461d096ab763568e7f71546ff4e8. * guix/scripts/system/reconfigure.scm (running-services): Fill in the 'transient?' field of <live-service>. * tests/services.scm ("shepherd-service-upgrade: one unchanged, one upgraded, one new") ("shepherd-service-upgrade: service depended on is not unloaded") ("shepherd-service-upgrade: obsolete services that depend on each other"): Adjust calls to 'live-service'. Ludovic Courtès
2022-04-09guix describe: Add missing import....Fixes a regression introduced in d4e858763c4303764729133c547b0a6dfe2354f9. * guix/scripts/describe.scm: Add missing autoload. Ludovic Courtès
2022-04-08ui: Move 'location->hyperlink' to (guix diagnostics)....* guix/ui.scm (location->hyperlink): Move to... * guix/diagnostics.scm: ... here. * guix/scripts/system/search.scm: Adjust imports accordingly. Ludovic Courtès
2022-04-08ui: Move hyperlink facilities to (guix colors)....* guix/ui.scm (supports-hyperlinks?, file-hyperlink, hyperlink): Move to... * guix/colors.scm: ... here. * guix/scripts/home.scm, guix/scripts/system.scm, guix/scripts/system/search.scm: Adjust imports accordingly. Ludovic Courtès
2022-04-04shell: Add '--export-manifest'....* guix/scripts/shell.scm (show-help, %options): Add '--export-manifest'. (manifest-entry-version-prefix, manifest->code*) (export-manifest): New procedures. (guix-shell): Honor '--export-manifest'. * tests/guix-shell-export-manifest.sh: New file. * Makefile.am (SH_TESTS): Add it. * doc/guix.texi (Invoking guix shell): Document '--export-manifest'. (Invoking guix environment): Link to it. (Invoking guix pack): Likewise. Ludovic Courtès
2022-04-04environment: Export 'load-manifest'....* guix/scripts/environment.scm (load-manifest): New procedure. (options/resolve-packages): Use it. Ludovic Courtès
2022-04-04packages: Add 'package-unique-version-prefix'....* gnu/packages.scm (package-unique-version-prefix): New procedure. * guix/scripts/package.scm (manifest-entry-version-prefix): Use it. * tests/packages.scm ("package-unique-version-prefix, gcc@8") ("package-unique-version-prefix, grep"): New tests. Ludovic Courtès
2022-04-01weather: Colorize the output....* guix/colors.scm (coloring-procedure): Export. * guix/scripts/weather.scm (report-server-coverage): Highlight the server name and colorize the availability ratio. Ludovic Courtès
2022-03-20home: import: Clarify alias parsing code....* guix/scripts/home/import.scm (generate-bash-configuration+modules) [bash-alias->pair]: Return #f on match failure. [parse-aliases]: Adjust accordingly and use 'match'. Remove 'filter' call. Ludovic Courtès
2022-03-20home: import: Properly parse aliases that contain quotes....* guix/scripts/home/import.scm (generate-bash-configuration+modules): Define 'alias-rx'. [bash-alias->pair]: Use it. * tests/home-import.scm (match-home-environment-bash-service-with-alias): New variable. ("manifest->code: Bash service with aliases"): New test. Ludovic Courtès
2022-03-19guix home: Show "container" in '--help' output....This is a followup to 094a2cfbe45c104d0da30ff9d975d052ca0c118c. * guix/scripts/home.scm (show-help): Add "container". Ludovic Courtès