Fix restricted mode when installing in non-canonical data dir

This commit is contained in:
Shea Levy 2018-01-25 06:52:51 -08:00
parent 98f3c75a0e
commit ddbcd01c83
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -308,7 +308,7 @@ EvalState::EvalState(const Strings & _searchPath, ref<Store> store)
for (auto & i : _searchPath) addToSearchPath(i);
for (auto & i : paths) addToSearchPath(i);
}
addToSearchPath("nix=" + settings.nixDataDir + "/nix/corepkgs");
addToSearchPath("nix=" + canonPath(settings.nixDataDir + "/nix/corepkgs"));
if (settings.restrictEval || settings.pureEval) {
allowedPaths = PathSet();