mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 14:40:21 -05:00
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.
This commit is contained in:
parent
c4e8d513f2
commit
369149995c
2 changed files with 8 additions and 6 deletions
|
@ -389,7 +389,8 @@ (define* (search-path-environment-variables entries profile
|
||||||
;; TODO: Offer the choice between exact/prefix/suffix.
|
;; TODO: Offer the choice between exact/prefix/suffix.
|
||||||
(environment-variable-definition variable value
|
(environment-variable-definition variable value
|
||||||
#:separator sep))))
|
#:separator sep))))
|
||||||
(evaluate-search-paths search-paths profile getenv))))
|
(evaluate-search-paths search-paths (list profile)
|
||||||
|
getenv))))
|
||||||
|
|
||||||
(define (display-search-paths entries profile)
|
(define (display-search-paths entries profile)
|
||||||
"Display the search path environment variables that may need to be set for
|
"Display the search path environment variables that may need to be set for
|
||||||
|
|
|
@ -114,11 +114,12 @@ (define len
|
||||||
(else
|
(else
|
||||||
(reverse (cons string result))))))
|
(reverse (cons string result))))))
|
||||||
|
|
||||||
(define* (evaluate-search-paths search-paths directory
|
(define* (evaluate-search-paths search-paths directories
|
||||||
#:optional (getenv (const #f)))
|
#:optional (getenv (const #f)))
|
||||||
"Evaluate SEARCH-PATHS, a list of search-path specifications, for DIRECTORY,
|
"Evaluate SEARCH-PATHS, a list of search-path specifications, for
|
||||||
and return a list of specification/value pairs. Use GETENV to determine the
|
DIRECTORIES, a list of directory names, and return a list of
|
||||||
current settings and report only settings not already effective."
|
specification/value pairs. Use GETENV to determine the current settings and
|
||||||
|
report only settings not already effective."
|
||||||
(define search-path-definition
|
(define search-path-definition
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((and spec
|
((and spec
|
||||||
|
@ -137,7 +138,7 @@ (define search-path-definition
|
||||||
;; directories (see
|
;; directories (see
|
||||||
;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.)
|
;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.)
|
||||||
(path (with-null-error-port
|
(path (with-null-error-port
|
||||||
(search-path-as-list files (list directory)
|
(search-path-as-list files directories
|
||||||
#:type type
|
#:type type
|
||||||
#:pattern pattern))))
|
#:pattern pattern))))
|
||||||
(if (every (cut member <> values) path)
|
(if (every (cut member <> values) path)
|
||||||
|
|
Loading…
Reference in a new issue