mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Simplify fixed-output check
This commit is contained in:
parent
c05d9ae7a5
commit
e80257f122
1 changed files with 2 additions and 6 deletions
|
@ -1066,12 +1066,8 @@ void DerivationGoal::haveDerivation()
|
||||||
|
|
||||||
/* Reject doing a hash build of anything other than a fixed-output
|
/* Reject doing a hash build of anything other than a fixed-output
|
||||||
derivation. */
|
derivation. */
|
||||||
if (buildMode == bmHash) {
|
if (buildMode == bmHash && !drv->isFixedOutput())
|
||||||
if (drv->outputs.size() != 1 ||
|
throw Error("cannot do a hash build of non-fixed-output derivation ‘%1%’", drvPath);
|
||||||
drv->outputs.find("out") == drv->outputs.end() ||
|
|
||||||
drv->outputs["out"].hashAlgo == "")
|
|
||||||
throw Error(format("cannot do a hash build of non-fixed-output derivation ‘%1%’") % drvPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We are first going to try to create the invalid output paths
|
/* We are first going to try to create the invalid output paths
|
||||||
through substitutes. If that doesn't work, we'll build
|
through substitutes. If that doesn't work, we'll build
|
||||||
|
|
Loading…
Reference in a new issue