diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-30T20·09-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-30T20·09-0400 |
commit | d059bf48e4bd4d1f50593dbe60953de8b2d395c7 (patch) | |
tree | 4dd8fed0eb5c2827000c84fd77719e4454adb627 /src/libstore/local-store.cc | |
parent | f9613da18033d0a9835bc57ac2142aca754983cf (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/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 023bf417e59a..aaa1abb56921 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -931,6 +931,10 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter & written in Perl (i.e. all of them) fail. */ unsetenv("DYLD_LIBRARY_PATH"); + /* Pass configuration options (including those overriden + with --option) to the substituter. */ + setenv("_NIX_OPTIONS", packSettings().c_str(), 1); + fromPipe.readSide.close(); toPipe.writeSide.close(); if (dup2(toPipe.readSide, STDIN_FILENO) == -1) |