modular-flake/tests/check-ok.nix
2026-10-10 19:03:51 +01:00

36 lines
620 B
Nix

{
checkPkgs,
checkSystem,
modularFlake,
...
}:
{
outputs = with modularFlake.defaultOutputs; [ checks ];
modules = [
(
{
lib,
hasSystem,
pkgs,
...
}:
lib.optionalAttrs hasSystem {
config = {
checks.derivation = modularFlake.mkNop pkgs;
checks.expr =
assert 2 + 2 == 4;
null;
};
}
)
];
fails = false;
expectedOutput = {
checks = {
${checkSystem} = {
derivation = modularFlake.mkNop checkPkgs;
expr = modularFlake.mkNop checkPkgs;
};
};
};
}