[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/05: build-self: Let HOME pass through the execution environment.
From: |
guix-commits |
Subject: |
01/05: build-self: Let HOME pass through the execution environment. |
Date: |
Sun, 12 May 2019 18:03:30 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e0244eb7a2290781ef490b6cedbd9c753caf6004
Author: Ludovic Courtès <address@hidden>
Date: Sun May 12 22:56:57 2019 +0200
build-self: Let HOME pass through the execution environment.
This is a followup to 48d498c2c3984784336b27ba5e261319f3ac6a3a, which
introduced a typo (missing '->' in 'mlet'.)
Fixes <https://bugs.gnu.org/35623>.
Reported by Karrick McDermott <address@hidden>.
* build-aux/build-self.scm (build): Add 'getenv' and 'setenv' calls for
HOME.
---
build-aux/build-self.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 1ddd223..0a1234a 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -399,6 +399,7 @@ files."
(mlet %store-monad ((build (build-program source version guile-version
#:pull-version pull-version))
(system (if system (return system) (current-system)))
+ (home -> (getenv "HOME"))
;; Note: Use the deprecated names here because the
;; caller might be Guix <= 0.16.0.
@@ -419,6 +420,9 @@ files."
;; $GUILE_LOAD_PATH & co.
(with-clean-environment
(setenv "GUILE_WARN_DEPRECATED" "no") ;be quiet and
drive
+ (when home
+ ;; Inherit HOME so that 'xdg-directory' works.
+ (setenv "HOME" home))
(open-pipe* OPEN_READ
(derivation->output-path build)
source system version