environment: Set 'GUIX_ENVIRONMENT' to the profile.

* guix/scripts/environment.scm (create-environment): Set
'GUIX_ENVIRONMENT' to PROFILE.
* tests/guix-environment.sh: Test it.
* doc/guix.texi (Invoking guix environment): Document it.
This commit is contained in:
Ludovic Courtès 2016-07-26 17:59:25 +02:00
parent 8173ceee1f
commit 201855221f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 16 additions and 3 deletions

View file

@ -90,8 +90,9 @@ existing enviroment variables with additional search paths."
(evaluate-profile-search-paths profile 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"))
;; adjust 'PS1' accordingly, for instance. Set it to PROFILE so users can
;; conveniently access its contents.
(setenv "GUIX_ENVIRONMENT" profile))
(define (show-search-paths profile search-paths pure?)
"Display SEARCH-PATHS applied to PROFILE. When PURE? is #t, do not augment