aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index a4c84c526..85eb05d61 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -698,6 +698,10 @@ Path EvalState::findFile(SearchPath & searchPath, const string & path, const Pos
Path res = r.second + suffix;
if (pathExists(res)) return canonPath(res);
}
+
+ if (hasPrefix(path, "nix/"))
+ return corepkgsPrefix + path.substr(4);
+
throw ThrownError({
.hint = hintfmt(evalSettings.pureEval
? "cannot look up '<%s>' in pure evaluation mode (use '--impure' to override)"