Fix restricted mode when installing in non-canonical data dir

This commit is contained in:
Shea Levy
2018-02-22 07:18:14 -05:00
parent 98f3c75a0e
commit ddbcd01c83
+1 -1
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();