diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-16 16:54:34 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-16 18:33:34 +0200 |
commit | c277231b7d8c11b8612acda578f759a6fd427c8f (patch) | |
tree | 25056a5f7a61e66989cf7f883b1560b03f7f354b /src/libexpr/flake/flake.cc | |
parent | f89349f07eda66dea2aa3b70bdc2c5c649406bdc (diff) |
Use RootValue
Diffstat (limited to 'src/libexpr/flake/flake.cc')
-rw-r--r-- | src/libexpr/flake/flake.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 212eceeac..cb50bd013 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -254,10 +254,10 @@ static Flake getFlake( if (auto outputs = vInfo.attrs->get(sOutputs)) { expectType(state, tLambda, *outputs->value, *outputs->pos); - flake.vOutputs = outputs->value; + flake.vOutputs = allocRootValue(outputs->value); - if (flake.vOutputs->lambda.fun->matchAttrs) { - for (auto & formal : flake.vOutputs->lambda.fun->formals->formals) { + if ((*flake.vOutputs)->lambda.fun->matchAttrs) { + for (auto & formal : (*flake.vOutputs)->lambda.fun->formals->formals) { if (formal.name != state.sSelf) flake.inputs.emplace(formal.name, FlakeInput { .ref = parseFlakeRef(formal.name) @@ -613,16 +613,16 @@ void callFlake(EvalState & state, mkString(*vRootSubdir, lockedFlake.flake.lockedRef.subdir); - static Value * vCallFlake = nullptr; + static RootValue vCallFlake = nullptr; if (!vCallFlake) { - vCallFlake = state.allocValue(); + vCallFlake = allocRootValue(state.allocValue()); state.eval(state.parseExprFromString( #include "call-flake.nix.gen.hh" - , "/"), *vCallFlake); + , "/"), **vCallFlake); } - state.callFunction(*vCallFlake, *vLocks, *vTmp1, noPos); + state.callFunction(**vCallFlake, *vLocks, *vTmp1, noPos); state.callFunction(*vTmp1, *vRootSrc, *vTmp2, noPos); state.callFunction(*vTmp2, *vRootSubdir, vRes, noPos); } |