aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-16 18:33:10 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-04-16 18:33:10 +0200
commitf89349f07eda66dea2aa3b70bdc2c5c649406bdc (patch)
tree9ff9148956592d29fc1c7e45ccf4dfc64b2457b5 /src/libexpr/primops.cc
parent0858738355dd9bdb20a723f15629c423fe14a7b1 (diff)
parentefaffaa9d1de38efecb718aa7a99ba1f2e342ade (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 08a1adf3b..6be88e6fd 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -122,16 +122,16 @@ static void prim_scopedImport(EvalState & state, const Pos & pos, Value * * args
}
w.attrs->sort();
- static Value * fun = nullptr;
+ static RootValue fun;
if (!fun) {
- fun = state.allocValue();
+ fun = allocRootValue(state.allocValue());
state.eval(state.parseExprFromString(
#include "imported-drv-to-derivation.nix.gen.hh"
- , "/"), *fun);
+ , "/"), **fun);
}
- state.forceFunction(*fun, pos);
- mkApp(v, *fun, w);
+ state.forceFunction(**fun, pos);
+ mkApp(v, **fun, w);
state.forceAttrs(v, pos);
} else {
state.forceAttrs(*args[0]);