Skip to content

Commit

Permalink
Only check apps for the current system
Browse files Browse the repository at this point in the history
  • Loading branch information
B4dM4n committed Jun 20, 2020
1 parent 377345e commit bf1deda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/nix/flake.cc
Expand Up @@ -241,13 +241,13 @@ struct CmdFlakeCheck : FlakeCommand

std::vector<StorePathWithOutputs> drvPaths;

auto checkApp = [&](const std::string & attrPath, Value & v, const Pos & pos) {
auto checkApp = [&](const std::string & attrPath, Value & v, const Pos & pos, const std::string & system) {
try {
auto app = App(*state, v);
for (auto & i : app.context) {
auto [drvPathS, outputName] = decodeContext(i);
auto drvPath = store->parseStorePath(drvPathS);
if (!outputName.empty() && drvPath.isDerivation())
if (!outputName.empty() && drvPath.isDerivation() && system == settings.thisSystem.get())
drvPaths.push_back({drvPath});
}
} catch (Error & e) {
Expand Down Expand Up @@ -417,7 +417,7 @@ struct CmdFlakeCheck : FlakeCommand
for (auto & attr2 : *attr.value->attrs)
checkApp(
fmt("%s.%s.%s", name, attr.name, attr2.name),
*attr2.value, *attr2.pos);
*attr2.value, *attr2.pos, attr.name);
}
}

Expand All @@ -437,7 +437,7 @@ struct CmdFlakeCheck : FlakeCommand
checkSystemName(attr.name, *attr.pos);
checkApp(
fmt("%s.%s", name, attr.name),
*attr.value, *attr.pos);
*attr.value, *attr.pos, attr.name);
}
}

Expand Down

0 comments on commit bf1deda

Please sign in to comment.