about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 9ed3eccf39a3..1cb1ec483339 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -131,7 +131,7 @@ static void getAllExprs(EvalState & state,
             if (hasSuffix(attrName, ".nix"))
                 attrName = string(attrName, 0, attrName.size() - 4);
             attrs.attrs[state.symbols.create(attrName)] =
-                ExprAttrs::AttrDef(state.parseExprFromFile(absPath(path2)), noPos);
+                ExprAttrs::AttrDef(state.parseExprFromFile(resolveExprPath(absPath(path2))), noPos);
         }
         else
             /* `path2' is a directory (with no default.nix in it);
@@ -143,7 +143,7 @@ static void getAllExprs(EvalState & state,
 
 static Expr * loadSourceExpr(EvalState & state, const Path & path)
 {
-    if (isNixExpr(path)) return state.parseExprFromFile(absPath(path));
+    if (isNixExpr(path)) return state.parseExprFromFile(resolveExprPath(absPath(path)));
 
     /* The path is a directory.  Put the Nix expressions in the
        directory in an attribute set, with the file name of each