summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner2021-11-08
|\
| * shell: Actually clean up the profile cache.Ludovic Courtès2021-11-07
| | | | | | | | | | | | | | | | | | 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.
| * import: egg: Allow imports of a specific version.Xinglu Chen2021-11-07
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * home: services: bash: Add ‘aliases’ field.Xinglu Chen2021-11-07
| | | | | | | | | | | | | | | | | | | | | | * 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>
| * environment: Suggest command upon 'execlp' failure.Ludovic Courtès2021-11-06
| | | | | | | | | | | | | | | | | | * 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'.
* | Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner2021-10-31
|\|
| * home: import: Avoid duplication of 'manifest->code'.Ludovic Courtès2021-10-31
| | | | | | | | | | | | | | | | | | | | * guix/scripts/home/import.scm (manifest->code): Remove. (manifest+configuration-files->code): New procedure. (import-manifest): Use 'manifest+configuration-files->code' instead of 'manifest->code'. * tests/home-import.scm (eval-test-with-home-environment): Likewise. (match-home-environment-transformations): New procedure. ("manifest->code: No services, package transformations"): New test.
| * home: import: Factorize triplicated 'version-spec' procedure.Ludovic Courtès2021-10-31
| | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (manifest-entry-version-prefix): New procedure, moved from... (export-manifest)[version-spec]: ... here. Adjust caller. * tests/home-import.scm (version-spec): Remove. (eval-test-with-home-environment): Use 'manifest-entry-version-prefix' instead. * guix/scripts/home/import.scm (import-manifest): Likewise.
| * home: import: Clarify "destination directory".Ludovic Courtès2021-10-31
| | | | | | | | | | | | | | | | Suggested by Liliana Marie Prikler <liliana.prikler@gmail.com>. * guix/scripts/home/import.scm (configurations+modules): Rename 'destination-directory' to 'configuration-directory'. Improve docstring.
| * home: import: Compare procedures with 'eq?'.Ludovic Courtès2021-10-31
| | | | | | | | | | | | | | | | 'procedure-name' is a debugging aid and cannot be reliably used to check for procedure equality. * guix/scripts/home/import.scm (configurations+modules): Remove use of 'procedure-name'.
| * guix home: import: Call ‘local-file’ with ‘name’Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | Set the name of the file to just the basename of the file passed to ‘local-file’. * guix/scripts/home/import.scm (basename+remove-dots): New procedure. (generate-bash-configuration+modules): Use it. * tests/home-import.scm (match-home-environment-bash-service): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * Add tests for ‘guix home import’.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | * tests/home-import.scm: New file. * Makefile.am (SCM_TESTS): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guix home: import: Delete duplicate modules when importing.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | Two different services might require the same module(s), so delete duplicates when generating the ‘use-modules’ form. * import.scm (manifest->code): Delete duplicate modules. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guix home: import: Don’t use 'slurp-file-gexp'.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | ‘slurp-file-gexp’ is not a bound procedure. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Don’t use ‘slurp-file-gexp’. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guix home: import: Fix module name for Bash service.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | * guix/scripts/home/import.scm (generate-bash-configuration+modules): Change (gnu home-services bash) to (gnu home-services shells); add (guix gexp). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guix home: import: Allow multiple modules to be imported for each service.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, only one module could be imported for each service, e.g., only (gnu home-services shell) could be imported when generating the Bash service declaration. However, for some services, multiple modules might need to be imported in order for it to work. * guix/scripts/home/import.scm (generate-bash-module+configuration): Rename to ... (generate-bash-configuration+modules): ... this. (%files-configurations-alist): Rename to ... (%files+configurations-alist): ... this. (modules+configurations): Rename to ... (configurations+modules): ... this. (manifest->code): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guix home: import: Make the user to specify a destination directory.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the appropriate the relevant configuration files to the destination directory, and call ‘local-file’ on them. Without this, ‘guix home import’ will generate a service declaration like this (service home-bash-service-type (home-bash-configuration (bashrc (list (slurp-file-gexp (local-file "/home/yoctocell/.bashrc")))))) but when running ‘guix home reconfigure’, the ~/.bashrc file would be moved, so when running ‘guix home reconfigure’ for the second time, it would read the ~/.bashrc which is itself a symlink to a file the store. * guix/scripts/home/import.scm (generate-bash-module+configuration): Take ‘destination-directory’ parameter (modules+configurations): Copy the user’s configuration file to ‘%destination-directory’. * guix/scripts/home.scm (process-command): Adjust accordingly; create ‘destination’ if it doesn’t exist. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * shell: Error out when an unauthorized guix.scm/manifest.scm is found.Ludovic Courtès2021-10-30
| | | | | | | | | | | | | | | | | | | | | | The previous behavior was confusing: a warning would be printed and 'guix shell' would go on starting an empty environment. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/shell.scm (auto-detect-manifest): Change "not loading" case from warning to error. * tests/guix-shell.sh: Adjust accordingly.
| * environment: Fix broken file-local variable.Zhu Zihao2021-10-28
| | | | | | | | | | | | * guix/scripts/environment.scm (Local Variables): Add missing eval. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * shell: Suggest running '--check' once for interactive use.Ludovic Courtès2021-10-26
| | | | | | | | | | | | * guix/scripts/shell.scm (hint-directory, hint-file, record-hint) (hint-given?): New procedures. (guix-shell): Record and probe the 'shell-check' hint.
| * environment: Add '--check'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/environment.scm (show-environment-options-help) (%options): Add '--check'. * guix/scripts/environment.scm (child-shell-environment) (validate-child-shell-environment): New procedures. (guix-environment*): Call 'validate-child-shell-environment' when 'check?' key is in OPTS. * doc/guix.texi (Invoking guix shell): Shorten footnote about Bash startup files. Document '--check' and mention startup files. (Invoking guix environment): Document '--check'.
| * shell: Maintain a profile cache.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shell: Maintain a profile cache. With this change, running "guix shell" (no arguments) is equivalent to: guix environment -r ~/.cache/guix/profiles/some-root -l guix.scm This is the cache miss. On cache hit, it's equivalent to: guix environment -p ~/.cache/guix/profiles/some-root ... which can run in 0.1s. * guix/scripts/shell.scm (options-with-caching): New procedure. (parse-args): Use it. (%profile-cache-directory): New variable. (profile-cache-key, profile-cached-gc-root): New procedures. (show-help, %options): Add '--rebuild-cache'. (guix-shell)[cache-entries, entry-expiration]: New procedures. Add call to 'maybe-remove-expired-cache-entries'. * doc/guix.texi (Invoking guix shell): Document '--rebuild-cache'.
| * environment: Autoload some modules.Ludovic Courtès2021-10-25
| | | | | | | | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm: Autoload a bunch of modules.
| * environment: Do not connect to the daemon when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm (guix-environment*)[store-needed?]: New variable. [with-store/maybe]: New macro. Use it instead of 'with-store', and remove 'with-build-handler' form.
| * environment: Skip derivation computation when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | | | | | | | * guix/scripts/environment.scm (guix-environment*): Bypass calls to 'package-derivation' and to 'manifest->derivation' when PROFILE is true.
| * shell: By default load the local 'manifest.scm' or 'guix.scm' file.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | * guix/scripts/shell.scm (parse-args): Add call to 'auto-detect-manifest'. (authorized-directory-file, authorized-shell-directory?) (find-file-in-parent-directories, auto-detect-manifest): New procedures. * tests/guix-shell.sh: Add test. * doc/guix.texi (Invoking guix shell): Document it.
| * Add 'guix shell'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell".
| * profiles: Add 'package->development-manifest'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | * guix/profiles.scm (package->development-manifest): New procedure. * guix/scripts/environment.scm (input->manifest-entry) (package-environment-inputs): Remove. * guix/scripts/environment.scm (options/resolve-packages): Use 'package->development-manifest' instead of 'package-environment-inputs'. * tests/profiles.scm ("package->development-manifest"): New test.
| * packages: Add 'package-development-inputs'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | * guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
* | Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe2021-10-18
|\|
| * refresh: Report suggested input changes with 'info'.Ludovic Courtès2021-10-15
| | | | | | | | | | | | * guix/scripts/refresh.scm (update-package): Define 'field', 'name', 'loc', and 'change-name'. Use 'info' rather than 'format' to report suggested input changes.
* | Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe2021-10-12
|\|
| * gnu: Add platform support.Mathieu Othacehe2021-10-11
| | | | | | | | | | | | | | | | | | * gnu/platform.scm: New file. * gnu/platforms/arm.scm: Ditto. * gnu/platforms/hurd.scm: Ditto. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| * home: services: configuration: Support file-like objects.Oleg Pykhalov2021-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/home/services/configuration.scm (interpose): Operate only with file-like objects. (string-or-gexp?): Delete procedure. (serialize-string-or-gexp): Rename to 'serialize-file-like'. (text-config?): Call 'file-like' intead of 'string-or-gexp?'. * guix/scripts/home/import.scm: (generate-bash-module+configuration): Don't call slurp-file-gexp. * gnu/home/services/configuration.scm: Move content ... * gnu/services/configuration.scm: here. * gnu/home/services/shells.scm: Delete (gnu home services configuration). * gnu/home/services/xdg.scm: Same. * gnu/local.mk: Same. * tests/guix-home.sh: Test home-bash-service-type and extension with home-bash-extension.
| * scripts: home: Make sure profile directory exists.Oleg Pykhalov2021-10-09
| | | | | | | | * guix/scripts/home.scm (process-action): Make sure profile directory exists.
| * Move (gnu home-services) to (gnu home services).Oleg Pykhalov2021-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/home-services.scm (%guix-home-root-directory): Replace gnu/home-services.scm with "gnu/home/services.scm". Rename to gnu/home/services.scm. * gnu/local.mk (GNU_SYSTEM_MODULES): Rename gnu/home-services.scm to gnu/home/services.scm. * doc/he-config-bare-bones.scm: Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Same. * gnu/home/services/fontutils.scm: Same. * gnu/home/services/mcron.scm: Same. * gnu/home/services/shells.scm: Same. * gnu/home/services/shepherd.scm: Same. * gnu/home/services/symlink-manager.scm: Same. * gnu/home/services/xdg.scm: Same. * guix/scripts/home.scm: Same. * guix/self.scm: Same.
| * Revert the #51061 patch series for now.Tobias Geerinckx-Rice2021-10-08
| | | | | | | | | | | | | | This reverts commits f63c79bf7674df012517f8e9148f94c611e35f32 ..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing. See <https://issues.guix.gnu.org/51061#32>.
| * gnu: Move (gnu home-services) to (gnu home services).Oleg Pykhalov2021-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/home-services/configuration.scm: Move the content ... * gnu/home/services/configuration.scm: ... here. * doc/guix.texi: Replace (gnu home-services mcron) with (gnu home services mcron). Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Replace (gnu home-services fontutils) with (gnu services fontutils). Replace (gnu home-services shells) with (gnu home services shells). Replace (gnu home-services symlink-manager) with (gnu home services symlink-manager). Replace (gnu home-services xdg) with (gnu home services xdg). * gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm. * gnu/home-services/mcron.scm: Move to gnu/home/services/mcron.scm. Replace (gnu home-services shepherd) with (gnu home services shepherd). * gnu/home-services.scm (%service-type-path): Search home services in "gnu/services". * gnu/home-services/shells.scm: Replace (gnu home-services configuration) with (gnu home services configuration). Rename to gnu/home/services/shells.scm. Replace (gnu home-services utils) with (gnu home services utils). * gnu/home-services/shepherd.scm: Move to gnu/home/services/shepherd.scm. * gnu/home-services/symlink-manager.scm: Rename to gnu/home/services/symlink-manager.scm. * gnu/home-services/utils.scm: Rename to gnu/home/services/utils.scm. * gnu/home-services/xdg.scm: Rename to gnu/home/services/xdg.scm. * guix/scripts/home/import.scm: Replace (gnu home-services bash) with (gnu home services bash). * gnu/home-services.scm: Update documentation string. * doc/he-config-bare-bones.scm: Apply new (gnu home-services ...) modules location. * gnu/local.mk (GNU_SYSTEM_MODULES): Same.
| * import: Add hex.pm importer.Hartmut Goebel2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * guix system: Adjust bootloader message to plural "targets".Ludovic Courtès2021-10-07
| | | | | | | | | | | | This is a followup to 2ca982ff41270288913ad6b7d5d9e1cad87b06d9. * guix/scripts/system.scm (install): Adjust message to plural 'targets'.
| * publish: Defer narinfo string creation to the http-write.Mathieu Othacehe2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "narinfo-string" procedure is expensive in term of IO operations and can take a while under IO pressure, such a GC collecting. Defer its call to a new thread created in the http-write procedure. Fixes: <https://issues.guix.gnu.org/48468> Partially fixes: <https://issues.guix.gnu.org/49089> * guix/scripts/publish.scm (render-narinfo): Defer the narinfo string creation to the http-write procedure. (compression->sexp, sexp->compression): New procedures. ("X-Nar-Compression"): Use them. ("X-Narinfo-Compressions"): New custom header. (strip-headers): Add the x-nar-path header. (http-write): Add narinfo on-the-fly creation support. It happens in a separated thread to prevent blocking the main thread.
| * scripts: home: Support dry-run.Efraim Flashner2021-10-04
| | | | | | | | * guix/scripts/home.scm (%options): Add option for dry-run.
| * scripts: home: Wire and document --expression flag.Pierre Langlois2021-10-02
| | | | | | | | | | | | * guix/scripts/home.scm (show-help): Add --expression option. (%options): Likewise. * doc/guix.texi (Invoking guix home): Document it.
| * home-services: Add missing imports and function definition.Andrew Tropin2021-09-28
| | | | | | | | | | | | | | | | | | | | * gnu/home-services/configuration.scm: Add missing imports. * gnu/home-services/utils.scm (list->human-readable-list): Add new function. * gnu/home-services/configuration.scm: Add missing imports. * gnu/home-services/xdg.scm: Fix ensure-list function. * guix/scripts/home/import.scm: Add missing imports. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
| * Merge branch 'wip-guix-home'Oleg Pykhalov2021-09-27
| |\
| | * scripts: home: Add import subcommand.Andrew Tropin2021-09-09
| | | | | | | | | | | | | | | | | | | | | * guix/scripts/home/import.scm: New file. * Makefile.am (MODULES): Add it. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
| | * scripts: Add 'guix home'.Andrew Tropin2021-09-09
| | | | | | | | | | | | | | | | | | | | | * guix/scripts/home.scm: New file. * Makefile.am (MODULES): Add it. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
| * | graph: Add '--max-depth'.Ludovic Courtès2021-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/graph.scm (export-graph): Add #:max-depth and honor it, adding 'depths' argument to 'loop'. * guix/scripts/graph.scm (%options, show-help): Add '--max-depth'. (%default-options): Add 'max-depth'. (guix-graph): Pass #:max-depth to 'export-graph'. * tests/graph.scm ("package DAG, limited depth"): New test. * doc/guix.texi (Invoking guix graph): Document it.
* | | style: Really honor '--input-simplification=always'.Ludovic Courtès2021-09-30
| | | | | | | | | | | | | | | * guix/scripts/style.scm (simplify-package-inputs): Use (const #t) when POLICY is 'always.
* | | Merge branch 'master' into core-updates-frozenMarius Bakke2021-09-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/bioinformatics.scm gnu/packages/chez.scm gnu/packages/docbook.scm gnu/packages/ebook.scm gnu/packages/gnome.scm gnu/packages/linux.scm gnu/packages/networking.scm gnu/packages/python-web.scm gnu/packages/python-xyz.scm gnu/packages/tex.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/dune.scm guix/build-system/go.scm guix/build-system/linux-module.scm guix/packages.scm