mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
search-paths: Add 'set-search-paths'.
* guix/search-paths.scm (set-search-paths): New procedure.
This commit is contained in:
parent
3636b1c7fe
commit
54fd5ad0a5
1 changed files with 13 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -38,7 +38,8 @@ (define-module (guix search-paths)
|
|||
string-tokenize*
|
||||
evaluate-search-paths
|
||||
environment-variable-definition
|
||||
search-path-definition))
|
||||
search-path-definition
|
||||
set-search-paths))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
|
@ -196,4 +197,14 @@ (define* (search-path-definition search-path value
|
|||
#:kind kind
|
||||
#:separator separator))))
|
||||
|
||||
(define* (set-search-paths search-paths directories
|
||||
#:key (setenv setenv))
|
||||
"Set the search path environment variables specified by SEARCH-PATHS for the
|
||||
given directories."
|
||||
(for-each (match-lambda
|
||||
((spec . value)
|
||||
(setenv (search-path-specification-variable spec)
|
||||
value)))
|
||||
(evaluate-search-paths search-paths directories)))
|
||||
|
||||
;;; search-paths.scm ends here
|
||||
|
|
Loading…
Reference in a new issue