1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

Move derivationType from DerivationGoal to LocalDerivationGoal

The super class doesn't actually care.
This commit is contained in:
John Ericson 2025-03-16 18:32:20 -04:00
parent 5283589542
commit 7f8d348f3d
3 changed files with 9 additions and 9 deletions

View file

@ -150,6 +150,13 @@ struct LocalDerivationGoal : DerivationGoal, RestrictionContext
*/
std::shared_ptr<AutoDelete> autoDelChroot;
/**
* The sort of derivation we are building.
*
* Just a cached value, can be recomputed from `drv`.
*/
std::optional<DerivationType> derivationType;
/**
* Stuff we need to pass to initChild().
*/
@ -478,7 +485,8 @@ Goal::Co LocalDerivationGoal::tryLocalBuild()
co_return tryToBuild();
}
assert(derivationType);
/* Cache this */
derivationType = drv->type();
/* Are we doing a chroot build? */
{