diff options
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r-- | guix/scripts/environment.scm | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 9712389842..6ae3b11e39 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -1100,17 +1100,18 @@ command-line option processing with 'parse-command-line'." ;; Evaluate EXP... with STORE bound to a connection, unless ;; STORE-NEEDED? is false, in which case STORE is bound to #f. (let ((proc (lambda (store) exp ...))) - (if store-needed? - (with-store s - (set-build-options-from-command-line s opts) - (with-build-handler (build-notifier #:use-substitutes? - (assoc-ref opts 'substitutes?) - #:verbosity - (assoc-ref opts 'verbosity) - #:dry-run? - (assoc-ref opts 'dry-run?)) - (proc s))) - (proc #f)))) + (parameterize ((%graft? (assoc-ref opts 'graft?))) + (if store-needed? + (with-store s + (set-build-options-from-command-line s opts) + (with-build-handler (build-notifier #:use-substitutes? + (assoc-ref opts 'substitutes?) + #:verbosity + (assoc-ref opts 'verbosity) + #:dry-run? + (assoc-ref opts 'dry-run?)) + (proc s))) + (proc #f))))) (when container? (assert-container-features)) @@ -1122,11 +1123,11 @@ command-line option processing with 'parse-command-line'." (when no-cwd? (leave (G_ "--no-cwd cannot be used without '--container'~%"))) (when emulate-fhs? - (leave (G_ "'--emulate-fhs' cannot be used without '--container~%'"))) + (leave (G_ "'--emulate-fhs' cannot be used without '--container'~%"))) (when nesting? - (leave (G_ "'--nesting' cannot be used without '--container~%'"))) + (leave (G_ "'--nesting' cannot be used without '--container'~%"))) (when (pair? symlinks) - (leave (G_ "'--symlink' cannot be used without '--container~%'")))) + (leave (G_ "'--symlink' cannot be used without '--container'~%")))) (with-store/maybe store (with-status-verbosity (assoc-ref opts 'verbosity) @@ -1146,14 +1147,14 @@ command-line option processing with 'parse-command-line'." (warning (G_ "no packages specified; creating an empty environment~%"))) ;; Use the bootstrap Guile when requested. - (parameterize ((%graft? (assoc-ref opts 'graft?)) - (%guile-for-build + (parameterize ((%guile-for-build (and store-needed? (package-derivation store (if bootstrap? %bootstrap-guile - (default-guile)))))) + (default-guile)) + system)))) (run-with-store store ;; Containers need a Bourne shell at /bin/sh. (mlet* %store-monad ((bash (environment-bash container? |