utils: Export 'search-path-as-list'.

* guix/build/utils.scm (search-path-as-list): Make public.
* guix/scripts/environment.scm (for-each-search-path): Use it.
This commit is contained in:
Ludovic Courtès 2014-12-27 23:24:35 +01:00
parent 7b21fe5385
commit bd2fc4d813
2 changed files with 3 additions and 3 deletions

View file

@ -45,6 +45,7 @@ (define-module (guix build utils)
delete-file-recursively
find-files
search-path-as-list
set-path-environment-variable
search-path-as-string->list
list->search-path-as-string

View file

@ -45,9 +45,8 @@ (define (for-each-search-path proc inputs derivations pure?)
(($ <search-path-specification>
variable directories separator)
(let* ((current (getenv variable))
(path ((@@ (guix build utils) search-path-as-list)
directories paths))
(value (list->search-path-as-string path separator)))
(path (search-path-as-list directories paths))
(value (list->search-path-as-string path separator)))
(proc variable
(if (and current (not pure?))
(string-append value separator current)