about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-30T20·09-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-30T20·09-0400
commitd059bf48e4bd4d1f50593dbe60953de8b2d395c7 (patch)
tree4dd8fed0eb5c2827000c84fd77719e4454adb627 /src/libstore/build.cc
parentf9613da18033d0a9835bc57ac2142aca754983cf (diff)
Pass configuration settings to the substituters
Previously substituters could read nix.conf themselves, but this
didn't take --option flags into account.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 887858fce30c..4a2bc5218b69 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -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));