1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Pass configuration settings to the substituters

Previously substituters could read nix.conf themselves, but this
didn't take --option flags into account.
This commit is contained in:
Eelco Dolstra 2012-07-30 16:09:54 -04:00
parent f9613da180
commit d059bf48e4
5 changed files with 37 additions and 6 deletions

View file

@ -2494,6 +2494,10 @@ void SubstitutionGoal::tryToRun()
outPipe.readSide.close();
outPipe.writeSide.close();
/* Pass configuration options (including those overriden
with --option) to the substituter. */
setenv("_NIX_OPTIONS", packSettings().c_str(), 1);
/* Fill in the arguments. */
Strings args;
args.push_back(baseNameOf(sub));