depot/packages/catalog/checks.nix
2024-07-06 00:02:08 +02:00

21 lines
568 B
Nix

{ lib, ... }:
{
perSystem = { config, ... }: {
catalog.depot = {
checks = lib.mapAttrs (name: check: {
description = "NixOS Test: ${name}";
actions = {
build = {
description = "Build this check.";
command = "nix build -L --no-link '${builtins.unsafeDiscardStringContext check.drvPath}^*'";
};
runInteractive = {
description = "Run interactive driver.";
command = lib.getExe check.driverInteractive;
};
};
}) config.checks;
};
};
}