1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 22:42:41 +01:00

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.
This commit is contained in:
John Ericson 2020-03-19 00:37:57 -04:00 committed by John Ericson
parent ef74fafc03
commit f1cf3ab870
4 changed files with 100 additions and 35 deletions

View file

@ -571,7 +571,9 @@ void LocalStore::checkDerivationOutputs(const StorePath & drvPath, const Derivat
}
else {
Hash h = hashDerivationModulo(*this, drv, true);
// Regular, non-CA derivation should always return a single hash and not
// hash per output.
Hash h = std::get<0>(hashDerivationModulo(*this, drv, true));
for (auto & i : drv.outputs)
check(makeOutputPath(i.first, h, drvName), i.second.path, i.first);
}