diff --git a/packages/catalog/checks.nix b/packages/catalog/checks.nix new file mode 100644 index 0000000..1dab997 --- /dev/null +++ b/packages/catalog/checks.nix @@ -0,0 +1,21 @@ +{ 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; + }; + }; +} diff --git a/packages/catalog/default.nix b/packages/catalog/default.nix new file mode 100644 index 0000000..4a42cfa --- /dev/null +++ b/packages/catalog/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./checks.nix + ]; +} diff --git a/packages/part.nix b/packages/part.nix index 946dbb2..7823eae 100644 --- a/packages/part.nix +++ b/packages/part.nix @@ -8,6 +8,7 @@ in { imports = [ ./projects.nix ./patched-inputs.nix + ./catalog ]; perSystem = { pkgs, self', system, ... }: let patched-derivations = import ./patched-derivations.nix (pkgs // { flakePackages = self'.packages; });