summaryrefslogtreecommitdiff
path: root/guix/search-paths.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-06-11 23:52:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-06-11 23:52:15 +0200
commita032b4454b3fc67e11e9fc2d8c2345288065fa29 (patch)
treec208124b79dbd2224b68c52106aa72ff2ebfa7ab /guix/search-paths.scm
parentb5724230fed2d043206df20d12a45bb962b7ee77 (diff)
parent6321ce42ab4d9ab788d858cb19bde4aa7a0e3ecc (diff)
downloadguix-patches-a032b4454b3fc67e11e9fc2d8c2345288065fa29.tar
guix-patches-a032b4454b3fc67e11e9fc2d8c2345288065fa29.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix/search-paths.scm')
-rw-r--r--guix/search-paths.scm15
1 files changed, 13 insertions, 2 deletions
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 4bf0e44389..002e6342bb 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -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 @@
string-tokenize*
evaluate-search-paths
environment-variable-definition
- search-path-definition))
+ search-path-definition
+ set-search-paths))
;;; Commentary:
;;;
@@ -196,4 +197,14 @@ prefix/suffix."
#: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