all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 31360@debbugs.gnu.org
Subject: [bug#31360] [PATCH 4/5] search-paths: Add 'set-search-paths'.
Date: Thu,  3 May 2018 22:22:26 +0200	[thread overview]
Message-ID: <20180503202227.22485-4-ludo@gnu.org> (raw)
In-Reply-To: <20180503202227.22485-1-ludo@gnu.org>

* guix/search-paths.scm (set-search-paths): New procedure.
---
 guix/search-paths.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 4bf0e4438..002e6342b 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
-- 
2.17.0

  parent reply	other threads:[~2018-05-03 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 20:15 [bug#31360] [PATCH 0/5] 'guix pack --relocatable' Ludovic Courtès
2018-05-03 20:22 ` [bug#31360] [PATCH 1/5] union: Add 'relative-file-name' Ludovic Courtès
2018-05-03 20:22   ` [bug#31360] [PATCH 2/5] profiles: Optionally use relative file names for symlink targets Ludovic Courtès
2018-05-03 20:22   ` [bug#31360] [PATCH 3/5] profiles: Allow lowerable objects other than packages in <manifest-entry> Ludovic Courtès
2018-05-03 20:22   ` Ludovic Courtès [this message]
2018-05-03 20:22   ` [bug#31360] [PATCH 5/5] pack: Add '--relocatable' Ludovic Courtès
2018-05-04  2:45 ` [bug#31360] [PATCH 0/5] 'guix pack --relocatable' Thompson, David
2018-05-04  9:27   ` Ludovic Courtès
2018-05-04 13:01     ` Thompson, David
2018-05-10 12:55 ` bug#31360: " Ludovic Courtès
2018-05-11 16:42 ` ‘guix pack --relocatable’ and the binary installation tarball Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180503202227.22485-4-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=31360@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.