environment: Add '--nesting'.

* guix/scripts/environment.scm (show-environment-options-help)
(%options): Add '--nesting'.
(options/resolve-packages): Handle it.
(launch-environment/container): Add #:nesting? and honor it.
[nesting-mappings]: New procedure.
(guix-environment*): Add support for '--nesting'.
* guix/scripts/shell.scm (profile-cached-gc-root): Special-case
'nesting?'.
* tests/guix-environment-container.sh: Test it.
* doc/guix.texi (Invoking guix shell): Document it.
This commit is contained in:
Ludovic Courtès 2023-03-23 17:22:38 +01:00 committed by Ludovic Courtès
parent 58769f9273
commit 57db09aae7
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 124 additions and 4 deletions

View file

@ -389,6 +389,8 @@ return #f and #f."
(if (not file)
(loop rest system file (cons spec specs))
(values #f #f)))
((('nesting? . #t) . rest)
(loop rest system file (append specs '("nested guix"))))
((('load . ('package candidate)) . rest)
(if (and (not file) (null? specs))
(loop rest system candidate specs)