diff options
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 5701452f94f1..674fa96f0bc0 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -181,6 +181,12 @@ EvalState::EvalState() gcInitialised = true; } #endif + + /* Initialise the Nix expression search path. */ + searchPathInsertionPoint = searchPath.end(); + Strings paths = tokenizeString(getEnv("NIX_PATH", ""), ":"); + foreach (Strings::iterator, i, paths) addToSearchPath(*i); + searchPathInsertionPoint = searchPath.begin(); } |