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

DerivationGoal slight cleanup of some impure drv logic

This commit is contained in:
John Ericson 2025-08-14 00:16:26 -04:00
parent 7707d0acad
commit 88275e5723

View file

@ -119,16 +119,12 @@ Goal::Co DerivationGoal::haveDerivation()
worker.store.addTempRoot(*i.second.second);
{
bool impure = drv->type().isImpure();
if (impure)
experimentalFeatureSettings.require(Xp::ImpureDerivations);
if (auto * mOutputHash = get(staticOutputHashes(worker.evalStore, *drv), wantedOutput)) {
outputHash = *mOutputHash;
}
if (impure) {
if (drv->type().isImpure()) {
experimentalFeatureSettings.require(Xp::ImpureDerivations);
/* We don't yet have any safe way to cache an impure derivation at
this step. */
co_return gaveUpOnSubstitution();