aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-03-11 13:23:23 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-03-31 13:43:20 +0200
commit18935e8b9f152f18705e738d4b8cc6fce97c8b02 (patch)
tree2f620847733e5efe3eb190704d1c8c660885cc5c /src/libstore/build
parent5cd72598feaff3c4bbcc7304a4844768f64a1ee0 (diff)
Support fixed-output derivations depending on impure derivations
Diffstat (limited to 'src/libstore/build')
-rw-r--r--src/libstore/build/derivation-goal.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 2f3490829..542a6f6ea 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -342,9 +342,9 @@ void DerivationGoal::gaveUpOnSubstitution()
inputDrvOutputs.clear();
if (useDerivation)
for (auto & i : dynamic_cast<Derivation *>(drv.get())->inputDrvs) {
- /* Ensure that pure derivations don't depend on impure
- derivations. */
- if (drv->type().isPure()) {
+ /* Ensure that pure, non-fixed-output derivations don't
+ depend on impure derivations. */
+ if (drv->type().isPure() && !drv->type().isFixed()) {
auto inputDrv = worker.evalStore.readDerivation(i.first);
if (!inputDrv.type().isPure())
throw Error("pure derivation '%s' depends on impure derivation '%s'",
@@ -993,7 +993,8 @@ void DerivationGoal::resolvedFinished()
auto newRealisation = realisation;
newRealisation.id = DrvOutput { initialOutputs.at(wantedOutput).outputHash, wantedOutput };
newRealisation.signatures.clear();
- newRealisation.dependentRealisations = drvOutputReferences(worker.store, *drv, realisation.outPath);
+ if (!drv->type().isFixed())
+ newRealisation.dependentRealisations = drvOutputReferences(worker.store, *drv, realisation.outPath);
signRealisation(newRealisation);
worker.store.registerDrvOutput(newRealisation);
}