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.
This commit is contained in:
Ludovic Courtès 2014-03-20 23:05:59 +01:00
parent 1fda6840a8
commit 89faa5c75c

View File

@ -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 ())