1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Factor out Machine::systemSupported

There's just enough logic (the `"builtin"` special case) that makes this
worthy of its own method.
This commit is contained in:
John Ericson 2024-01-23 12:52:54 -05:00
parent 870acc2892
commit 0aa85088de
3 changed files with 13 additions and 3 deletions

View file

@ -137,9 +137,8 @@ static int main_build_remote(int argc, char * * argv)
for (auto & m : machines) {
debug("considering building on remote machine '%s'", m.storeUri);
if (m.enabled
&& (neededSystem == "builtin"
|| m.systemTypes.count(neededSystem) > 0) &&
if (m.enabled &&
m.systemSupported(neededSystem) &&
m.allSupported(requiredFeatures) &&
m.mandatoryMet(requiredFeatures))
{