mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Use RootValue
This commit is contained in:
parent
9f46f54de4
commit
fcd048a526
3 changed files with 14 additions and 19 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue