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

Merge pull request #12692 from obsidiansystems/small-derivation-goal-cleanups

Small derivation goal cleanups
This commit is contained in:
Jörg Thalheim 2025-03-19 23:30:23 +01:00 committed by GitHub
commit c97f779dbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 17 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? */
{