feat: add testing infrastructure

This commit is contained in:
Patrick 2025-04-14 21:12:17 +02:00
parent d04a0125d5
commit c875dd77fe
No known key found for this signature in database
GPG key ID: 451F95EFB8BECD0F
4 changed files with 661 additions and 1 deletions

View file

@ -15,6 +15,10 @@
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixt = {
url = "github:nix-community/nixt";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@ -28,6 +32,18 @@
"x86_64-linux"
"aarch64-linux"
];
flake.__nixt = inputs.nixt.lib.grow {
blocks = import ./tests {
inherit (inputs) nixt;
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
overlays = [
self.overlays.default
];
};
};
};
flake.modules = {
flake = {
@ -76,6 +92,10 @@
package = statix;
help = "Lint nix code";
}
{
package = inputs.nixt.packages.${system}.default;
help = "Lint nix code";
}
{
package = deadnix;
help = "Find unused expressions in nix code";