Skip to content

Commit b56dd21

Browse files
committed
Settings::ExternalBuilder::systems make set
Nothing cares about the order, actually.
1 parent 2308aaf commit b56dd21

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/libstore/include/nix/store/globals.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ public:
13751375

13761376
struct ExternalBuilder
13771377
{
1378-
std::vector<std::string> systems;
1378+
StringSet systems;
13791379
Path program;
13801380
std::vector<std::string> args;
13811381
};

src/libstore/unix/build/external-derivation-builder.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ struct ExternalDerivationBuilder : DerivationBuilderImpl
1919
LocalStore & store, std::unique_ptr<DerivationBuilderCallbacks> & miscMethods, DerivationBuilderParams & params)
2020
{
2121
for (auto & handler : settings.externalBuilders.get()) {
22-
for (auto & system : handler.systems)
23-
if (params.drv.platform == system)
24-
return std::make_unique<ExternalDerivationBuilder>(
25-
store, std::move(miscMethods), std::move(params), handler);
22+
if (handler.systems.contains(params.drv.platform))
23+
return std::make_unique<ExternalDerivationBuilder>(
24+
store, std::move(miscMethods), std::move(params), handler);
2625
}
2726
return {};
2827
}

0 commit comments

Comments
 (0)