1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Settings::ExternalBuilder::systems make set

Nothing cares about the order, actually.
This commit is contained in:
John Ericson 2025-10-10 17:18:40 -04:00
parent 2308aaf192
commit b56dd21c31
2 changed files with 4 additions and 5 deletions

View file

@ -1375,7 +1375,7 @@ public:
struct ExternalBuilder
{
std::vector<std::string> systems;
StringSet systems;
Path program;
std::vector<std::string> args;
};

View file

@ -19,10 +19,9 @@ struct ExternalDerivationBuilder : DerivationBuilderImpl
LocalStore & store, std::unique_ptr<DerivationBuilderCallbacks> & miscMethods, DerivationBuilderParams & params)
{
for (auto & handler : settings.externalBuilders.get()) {
for (auto & system : handler.systems)
if (params.drv.platform == system)
return std::make_unique<ExternalDerivationBuilder>(
store, std::move(miscMethods), std::move(params), handler);
if (handler.systems.contains(params.drv.platform))
return std::make_unique<ExternalDerivationBuilder>(
store, std::move(miscMethods), std::move(params), handler);
}
return {};
}