From 89faa5c75cb3a419c6d02c51f56955275b7ae351 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 20 Mar 2014 23:05:59 +0100 Subject: daemon: Really override the substituters setting. Reported by Andreas Enge : . * nix/nix-daemon/guix-daemon.cc (main): Set the 'NIX_SUBSTITUTERS' env. var. Leave 'settings.substituters' unchanged. --- nix/nix-daemon/guix-daemon.cc | 9 +++++---- 1 file 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 (subs, ":"); + { + string subst = + settings.nixLibexecDir + "/guix/substitute-binary"; + setenv ("NIX_SUBSTITUTERS", subst.c_str (), 1); + } } if (geteuid () == 0 && settings.buildUsersGroup.empty ()) -- cgit v1.2.3