From 14ca85688cdd17dfcf4b2bd8c324f21d6f3d1dde Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 28 Feb 2018 06:19:40 -0500 Subject: [PATCH] Actually fix nixDataDir in non-canonical path --- src/libexpr/eval.cc | 2 +- src/libexpr/primops.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 63afccbec..f94c23ea7 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -313,7 +313,7 @@ EvalState::EvalState(const Strings & _searchPath, ref store) for (auto & i : _searchPath) 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) { allowedPaths = PathSet(); diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index db258ea18..6778023f5 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -2236,7 +2236,7 @@ void EvalState::createBaseEnv() /* Add a wrapper around the derivation primop that computes the `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); evalFile(path, v); addConstant("derivation", v);