1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

Actually fix nixDataDir in non-canonical path

(cherry picked from commit 14ca85688c)
This commit is contained in:
Shea Levy 2018-02-28 06:19:40 -05:00 committed by Eelco Dolstra
parent 77a2cd2f5e
commit 7e989da790
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -2236,7 +2236,7 @@ void EvalState::createBaseEnv()
/* Add a wrapper around the derivation primop that computes the /* Add a wrapper around the derivation primop that computes the
`drvPath' and `outPath' attributes lazily. */ `drvPath' and `outPath' attributes lazily. */
string path = settings.nixDataDir + "/nix/corepkgs/derivation.nix"; string path = canonPath(settings.nixDataDir + "/nix/corepkgs/derivation.nix", true);
sDerivationNix = symbols.create(path); sDerivationNix = symbols.create(path);
evalFile(path, v); evalFile(path, v);
addConstant("derivation", v); addConstant("derivation", v);