aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 907f15246..8288dd6a1 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -775,10 +775,8 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
auto outPath = state.store->makeFixedOutputPath(ingestionMethod, h, drvName);
if (!jsonObject) drv.env["out"] = state.store->printStorePath(outPath);
drv.outputs.insert_or_assign("out", DerivationOutput {
- std::move(outPath),
- (ingestionMethod == FileIngestionMethod::Recursive ? "r:" : "")
- + printHashType(h.type),
- h.to_string(Base16, false),
+ .path = std::move(outPath),
+ .hash = FileSystemHash { ingestionMethod, std::move(h) },
});
}
@@ -792,7 +790,10 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
for (auto & i : outputs) {
if (!jsonObject) drv.env[i] = "";
drv.outputs.insert_or_assign(i,
- DerivationOutput { StorePath::dummy, "", "" });
+ DerivationOutput {
+ .path = StorePath::dummy,
+ .hash = std::optional<FileSystemHash> {},
+ });
}
Hash h = hashDerivationModulo(*state.store, Derivation(drv), true);
@@ -801,7 +802,10 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
auto outPath = state.store->makeOutputPath(i, h, drvName);
if (!jsonObject) drv.env[i] = state.store->printStorePath(outPath);
drv.outputs.insert_or_assign(i,
- DerivationOutput { std::move(outPath), "", "" });
+ DerivationOutput {
+ .path = std::move(outPath),
+ .hash = std::optional<FileSystemHash>(),
+ });
}
}