diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-05-05 13:55:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-05-05 15:13:58 +0200 |
commit | 369149995cd4cedc59f1576a23c4df432e682402 (patch) | |
tree | 0cc30ed32dc729743ee9132cb4dd012e7254f323 /guix/search-paths.scm | |
parent | c4e8d513f2048bd7ca3b57c73c2b217a349e7b46 (diff) | |
download | patches-369149995cd4cedc59f1576a23c4df432e682402.tar patches-369149995cd4cedc59f1576a23c4df432e682402.tar.gz |
search-paths: 'evaluate-search-paths' can be passed a list of directories.
* guix/search-paths.scm (evaluate-search-paths): Change 'directory' to
'directories', and adjust 'search-path-as-list' accordingly.
* guix/scripts/package.scm (search-path-environment-variables): Adjust
call accordingly.
Diffstat (limited to 'guix/search-paths.scm')
-rw-r--r-- | guix/search-paths.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 154e508d5b..9dfad89169 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -114,11 +114,12 @@ like `string-tokenize', but SEPARATOR is a string." (else (reverse (cons string result)))))) -(define* (evaluate-search-paths search-paths directory +(define* (evaluate-search-paths search-paths directories #:optional (getenv (const #f))) - "Evaluate SEARCH-PATHS, a list of search-path specifications, for DIRECTORY, -and return a list of specification/value pairs. Use GETENV to determine the -current settings and report only settings not already effective." + "Evaluate SEARCH-PATHS, a list of search-path specifications, for +DIRECTORIES, a list of directory names, 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 ((and spec @@ -137,7 +138,7 @@ current settings and report only settings not already effective." ;; directories (see ;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.) (path (with-null-error-port - (search-path-as-list files (list directory) + (search-path-as-list files directories #:type type #:pattern pattern)))) (if (every (cut member <> values) path) |