1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

Use RootValue

This commit is contained in:
Eelco Dolstra 2020-04-16 16:54:34 +02:00
parent 9f46f54de4
commit fcd048a526
3 changed files with 14 additions and 19 deletions

View file

@ -121,16 +121,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]);