diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index 68635294..c9d21200 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -332,21 +332,26 @@ Step::ptr State::createStep(std::shared_ptr store, const Path & drvPat it's not runnable yet, and other threads won't make it runnable while step->created == false. */ step->drv = readDerivation(drvPath); - step->systemType = step->drv.platform; - { - auto i = step->drv.env.find("requiredSystemFeatures"); - if (i != step->drv.env.end()) { - step->requiredSystemFeatures = tokenizeString>(i->second); - step->systemType += ":"; - step->systemType += concatStringsSep(",", step->requiredSystemFeatures); - } - } auto attr = step->drv.env.find("preferLocalBuild"); step->preferLocalBuild = attr != step->drv.env.end() && attr->second == "1" && has(localPlatforms, step->drv.platform); + step->systemType = step->drv.platform; + { + auto i = step->drv.env.find("requiredSystemFeatures"); + StringSet features; + if (i != step->drv.env.end()) + features = step->requiredSystemFeatures = tokenizeString>(i->second); + if (step->preferLocalBuild) + features.insert("local"); + if (!features.empty()) { + step->systemType += ":"; + step->systemType += concatStringsSep(",", features); + } + } + /* Are all outputs valid? */ bool valid = true; for (auto & i : step->drv.outputs) {