Merge pull request #1342 from obsidiansystems/dedup-required-system-features

Use `nix::ParsedDerivation::getRequiredSystemFeatures()`
This commit is contained in:
John Ericson 2024-01-24 21:13:49 -05:00 committed by GitHub
commit f6a2b7562a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -462,10 +462,7 @@ Step::ptr State::createStep(ref<Store> destStore,
step->systemType = step->drv->platform;
{
auto i = step->drv->env.find("requiredSystemFeatures");
StringSet features;
if (i != step->drv->env.end())
features = step->requiredSystemFeatures = tokenizeString<std::set<std::string>>(i->second);
StringSet features = step->requiredSystemFeatures = step->parsedDrv->getRequiredSystemFeatures();
if (step->preferLocalBuild)
features.insert("local");
if (!features.empty()) {