summaryrefslogtreecommitdiff
path: root/guix/scripts/shell.scm
Commit message (Collapse)AuthorAge
* 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.
* 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.
* 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.
* 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'.
* 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".