diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-07-01 14:39:14 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-01 23:29:49 +0200 |
commit | 28de8d258b30f887053d43b2d75a7ed5e2fa2adc (patch) | |
tree | ed0cb7f5c487d7d93bfc5e11472eac0ea81f2443 /guix/scripts/environment.scm | |
parent | 50500f7cf0786cccb8211ddac75a56c3c82859f6 (diff) |
environment: Define 'GUIX_ENVIRONMENT'.
* guix/scripts/environment.scm (create-environment): Define 'GUIX_ENVIRONMENT'.
* doc/guix.texi (Invoking guix environment): Document it.
* gnu/system/shadow.scm (default-skeletons): Adjust 'PS1' depending on whether
'GUIX_ENVIRONMENT' is defined.
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r-- | guix/scripts/environment.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 00c4df7a3e..c6cac469e4 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -78,7 +78,11 @@ search paths." (if (and current (not pure?)) (string-append value separator current) value))))) - (evaluate-input-search-paths inputs paths))) + (evaluate-input-search-paths inputs paths)) + + ;; Give users a way to know that they're in 'guix environment', so they can + ;; adjust 'PS1' accordingly, for instance. + (setenv "GUIX_ENVIRONMENT" "t")) (define (show-search-paths inputs search-paths pure?) "Display SEARCH-PATHS applied to the packages specified by INPUTS, a list of |