From 7e1cfa97c6b410ed25ae0d3c3f10274aae9f6758 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 6 Jan 2023 12:52:16 -0500 Subject: [PATCH] Make derivation primop code for fixed output more concise --- src/libexpr/primops.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 7e4b944b1..0398a5b66 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1248,16 +1248,14 @@ static void prim_derivationStrict(EvalState & state, const PosIdx pos, Value * * auto h = newHashAllowEmpty(*outputHash, parseHashTypeOpt(outputHashAlgo)); auto method = ingestionMethod.value_or(FileIngestionMethod::Flat); - // FIXME non-trivial fixed refs set - auto ca = contentAddressFromMethodHashAndRefs( - method, - std::move(h), - {}); - DerivationOutput::CAFixed dof { .ca = ca }; + DerivationOutput::CAFixed dof { + // FIXME non-trivial fixed refs set + .ca = contentAddressFromMethodHashAndRefs(method, std::move(h), {}), + }; drv.env["out"] = state.store->printStorePath(dof.path(*state.store, drvName, "out")); - drv.outputs.insert_or_assign("out", dof); + drv.outputs.insert_or_assign("out", std::move(dof)); } else if (contentAddressed || isImpure) {