about summary refs log tree commit diff
path: root/src/nix-instantiate
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index 0f0710d680cb..fd2c04eae444 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -44,9 +44,11 @@ void processExpr(EvalState & state, const Strings & attrPaths,
         return;
     }
 
+    Value vRoot;
+    state.eval(e, vRoot);
+
     foreach (Strings::const_iterator, i, attrPaths) {
-        Value v;
-        findAlongAttrPath(state, *i, autoArgs, e, v);
+        Value & v(*findAlongAttrPath(state, *i, autoArgs, vRoot));
         state.forceValue(v);
 
         PathSet context;