~ruther/guix-local

89faa5c75cb3a419c6d02c51f56955275b7ae351 — Ludovic Courtès 12 years ago 1fda684
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.
1 files changed, 5 insertions(+), 4 deletions(-)

M nix/nix-daemon/guix-daemon.cc
M nix/nix-daemon/guix-daemon.cc => nix/nix-daemon/guix-daemon.cc +5 -4
@@ 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 ())