1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00

Ensure that -I flags get included in nixPath

Also fixes #261.
This commit is contained in:
Eelco Dolstra 2014-05-26 16:50:36 +02:00
parent a8edf185a9
commit 39d72640c2
8 changed files with 33 additions and 18 deletions

View file

@ -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();
}