From d059bf48e4bd4d1f50593dbe60953de8b2d395c7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Jul 2012 16:09:54 -0400 Subject: Pass configuration settings to the substituters Previously substituters could read nix.conf themselves, but this didn't take --option flags into account. --- src/libstore/local-store.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libstore/local-store.cc') 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) -- cgit 1.4.1