summaryrefslogtreecommitdiff
path: root/guix/search-paths.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-04 22:27:11 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-04 23:30:52 +0200
commit441cfb420ab7979443cc2752b714738151c9c4e6 (patch)
tree3e6ff3b7721ace02c055d1073473e77e856ba555 /guix/search-paths.scm
parentb07901c0cc5b36efdc92263ddeaa2be28cf2f398 (diff)
search-paths: 'evaluate-search-paths' now returns spec/value pairs.
* guix/search-paths.scm (evaluate-search-paths): Return specification/value pairs instead of variable/value pairs. * guix/scripts/package.scm (search-path-environment-variables): Adjust accordingly. Pass #:separator to 'environment-variable-definition'.
Diffstat (limited to 'guix/search-paths.scm')
-rw-r--r--guix/search-paths.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 7957c88241..154e508d5b 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -117,12 +117,13 @@ like `string-tokenize', but SEPARATOR is a string."
(define* (evaluate-search-paths search-paths directory
#:optional (getenv (const #f)))
"Evaluate SEARCH-PATHS, a list of search-path specifications, for DIRECTORY,
-and return a list of variable/value pairs. Use GETENV to determine the
+and return a list of specification/value pairs. Use GETENV to determine the
current settings and report only settings not already effective."
(define search-path-definition
(match-lambda
- (($ <search-path-specification> variable files separator
- type pattern)
+ ((and spec
+ ($ <search-path-specification> variable files separator
+ type pattern))
(let* ((values (or (and=> (getenv variable)
(cut string-tokenize* <> separator))
'()))
@@ -141,7 +142,7 @@ current settings and report only settings not already effective."
#:pattern pattern))))
(if (every (cut member <> values) path)
#f ;VARIABLE is already set appropriately
- (cons variable (string-join path separator)))))))
+ (cons spec (string-join path separator)))))))
(filter-map search-path-definition search-paths))