aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2020-03-19 00:37:57 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-03-19 10:30:49 -0400
commitf1cf3ab870343a6894c08e2bb893ea69badfc397 (patch)
treea794a1913471f0d44f45e67655c217850d759a8f /src/libexpr/primops.cc
parentef74fafc0368944e6cfc3b804b4bcdddd6bcf9c0 (diff)
hashDerivationModulo: Generalize for multiple fixed ouputs per drv
See documentattion in header and comments in implementation for details. This is actually done in preparation for floating ca derivations, not multi-output fixed ca derivations, but the distinction doesn't yet mattter. Thanks @cole-h for finding and fixing a bunch of typos.
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 8de234951..c9a16784e 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -742,7 +742,9 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
DerivationOutput(StorePath::dummy.clone(), "", ""));
}
- Hash h = hashDerivationModulo(*state.store, Derivation(drv), true);
+ // Regular, non-CA derivation should always return a single hash and not
+ // hash per output.
+ Hash h = std::get<0>(hashDerivationModulo(*state.store, Derivation(drv), true));
for (auto & i : outputs) {
auto outPath = state.store->makeOutputPath(i, h, drvName);