aboutsummaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-09 13:22:29 +0200
committerLudovic Courtès <ludo@gnu.org>2018-07-11 00:52:36 +0200
commit78d55b703d155d36520e1c93dc08a6502c56bd55 (patch)
treef4a83a9baffada3b7bdfa8b5bfb784796749f3c3 /guix/profiles.scm
parent10f0a40c16bb572ab7b45f32e39b7761e519ba32 (diff)
downloadgnu-guix-78d55b703d155d36520e1c93dc08a6502c56bd55.tar
gnu-guix-78d55b703d155d36520e1c93dc08a6502c56bd55.tar.gz
profiles: Introduce 'profile-search-paths' and use it.
* guix/profiles.scm (profile-search-paths): New procedure. * guix/scripts/environment.scm (evaluate-search-paths): Remove. (create-environment): Replace 'paths' with 'manifest'. Use 'profile-search-paths' instead of 'evaluate-search-paths'. (show-search-paths): Likewise. (launch-environment): Replace 'paths' with 'manifest'. Make 'pure?' a keyword parameter. (launch-environment/fork, launch-environment/container): Likewise. (guix-environment): Remove 'paths' variable. Adjust callers of the above procedures accordingly.
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 88228f1558..d2a794b187 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -110,6 +110,7 @@
ca-certificate-bundle
%default-profile-hooks
profile-derivation
+ profile-search-paths
generation-number
generation-numbers
@@ -1400,6 +1401,19 @@ are cross-built for TARGET."
;; to have no substitute to offer.
#:substitutable? #f)))
+(define* (profile-search-paths profile
+ #:optional (manifest (profile-manifest profile))
+ #:key (getenv (const #f)))
+ "Read the manifest of PROFILE and evaluate the values of search path
+environment variables required by PROFILE; return a list of
+specification/value pairs. If MANIFEST is not #f, it is assumed to be the
+manifest of PROFILE, which avoids rereading it.
+
+Use GETENV to determine the current settings and report only settings not
+already effective."
+ (evaluate-search-paths (manifest-search-paths manifest)
+ (list profile) getenv))
+
(define (profile-regexp profile)
"Return a regular expression that matches PROFILE's name and number."
(make-regexp (string-append "^" (regexp-quote (basename profile))