aboutsummaryrefslogtreecommitdiff
path: root/nix/nix-daemon/guix-daemon.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-20 23:05:59 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-20 23:06:48 +0100
commit89faa5c75cb3a419c6d02c51f56955275b7ae351 (patch)
tree2cd92f52c77471bac356f1e7addd89a797c04377 /nix/nix-daemon/guix-daemon.cc
parent1fda6840a892e55b579dfeb8f4590b5cd2874662 (diff)
downloadguix-89faa5c75cb3a419c6d02c51f56955275b7ae351.tar
guix-89faa5c75cb3a419c6d02c51f56955275b7ae351.tar.gz
daemon: Really override the substituters setting.
Reported by Andreas Enge <andreas@enge.fr>: <https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00211.html>. * nix/nix-daemon/guix-daemon.cc (main): Set the 'NIX_SUBSTITUTERS' env. var. Leave 'settings.substituters' unchanged.
Diffstat (limited to 'nix/nix-daemon/guix-daemon.cc')
-rw-r--r--nix/nix-daemon/guix-daemon.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 79cd080363..086b846ce1 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -287,10 +287,11 @@ main (int argc, char *argv[])
string subs = getEnv ("NIX_SUBSTITUTERS", "default");
if (subs == "default")
- settings.substituters.push_back (settings.nixLibexecDir
- + "/guix/substitute-binary");
- else
- settings.substituters = tokenizeString<Strings> (subs, ":");
+ {
+ string subst =
+ settings.nixLibexecDir + "/guix/substitute-binary";
+ setenv ("NIX_SUBSTITUTERS", subst.c_str (), 1);
+ }
}
if (geteuid () == 0 && settings.buildUsersGroup.empty ())