Merge pull request #3710 from tweag/reserve_ca_derivations

Reserve the `__contentAddressed` derivation parameter
This commit is contained in:
Eelco Dolstra
2020-06-17 18:28:26 +02:00
committed by GitHub
3 changed files with 13 additions and 0 deletions

View File

@@ -1195,6 +1195,12 @@ void DerivationGoal::haveDerivation()
parsedDrv = std::make_unique<ParsedDerivation>(drvPath, *drv);
if (parsedDrv->contentAddressed()) {
settings.requireExperimentalFeature("content-addressed-paths");
throw Error("content-addressed-paths isn't implemented yet");
}
/* We are first going to try to create the invalid output paths
through substitutes. If that doesn't work, we'll build
them. */

View File

@@ -117,4 +117,9 @@ bool ParsedDerivation::substitutesAllowed() const
return getBoolAttr("allowSubstitutes", true);
}
bool ParsedDerivation::contentAddressed() const
{
return getBoolAttr("__contentAddressed", false);
}
}

View File

@@ -34,6 +34,8 @@ public:
bool willBuildLocally() const;
bool substitutesAllowed() const;
bool contentAddressed() const;
};
}