aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-26 16:50:36 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-26 16:52:31 +0200
commit39d72640c2459dc2fa689bfe8b756ee193f7b98a (patch)
tree2d889185bf06c0446d9b3774054f1264fbf443ff /src/libexpr/eval.cc
parenta8edf185a9e1677088c8c30acc9d281c8350bca7 (diff)
Ensure that -I flags get included in nixPath
Also fixes #261.
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 81abe5b61..b6b69c2bd 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -153,7 +153,7 @@ static Symbol getName(const AttrName & name, EvalState & state, Env & env)
}
-EvalState::EvalState()
+EvalState::EvalState(const Strings & _searchPath)
: sWith(symbols.create("<with>"))
, sOutPath(symbols.create("outPath"))
, sDrvPath(symbols.create("drvPath"))
@@ -219,11 +219,10 @@ EvalState::EvalState()
#endif
/* Initialise the Nix expression search path. */
- searchPathInsertionPoint = searchPath.end();
Strings paths = tokenizeString<Strings>(getEnv("NIX_PATH", ""), ":");
- foreach (Strings::iterator, i, paths) addToSearchPath(*i);
+ for (auto & i : _searchPath) addToSearchPath(i);
+ for (auto & i : paths) addToSearchPath(i);
addToSearchPath("nix=" + settings.nixDataDir + "/nix/corepkgs");
- searchPathInsertionPoint = searchPath.begin();
createBaseEnv();
}