diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-26T14·50+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-26T14·52+0200 |
commit | 39d72640c2459dc2fa689bfe8b756ee193f7b98a (patch) | |
tree | 2d889185bf06c0446d9b3774054f1264fbf443ff /src/libexpr/eval.cc | |
parent | a8edf185a9e1677088c8c30acc9d281c8350bca7 (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.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 81abe5b618a5..b6b69c2bdbf5 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(); } |