aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-06 12:52:16 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-06 12:52:16 -0500
commit7e1cfa97c6b410ed25ae0d3c3f10274aae9f6758 (patch)
tree6dfd6d644858626cfa674d4be0f5827e4ffe64b7 /src/libexpr/primops.cc
parent848b0832b57dbd71dda97fc431ac9e57c7c9935e (diff)
Make derivation primop code for fixed output more concise
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc12
1 files 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) {