Make it easier to add checks to resulting flake

This commit is contained in:
Kaare Hoff Skovgaard 2025-07-05 14:36:50 +02:00
parent fb982690ee
commit 9ab6383e19
Signed by: khs
GPG key ID: C7D890804F01E9F0

View file

@ -50,6 +50,7 @@
"aarch64-linux" "aarch64-linux"
"aarch64-darwin" "aarch64-darwin"
], ],
checks ? pkgs: { },
devShellPackages ? (pkgs: [ ]), devShellPackages ? (pkgs: [ ]),
treeFmtFile ? ./treefmt.nix, treeFmtFile ? ./treefmt.nix,
... ...
@ -72,7 +73,7 @@
formatter = treeFmtEval.config.build.wrapper; formatter = treeFmtEval.config.build.wrapper;
checks = { checks = {
fmt = treeFmtEval.config.build.check self; fmt = treeFmtEval.config.build.check self;
}; } // (checks pkgs);
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
packages = [ packages = [
pkgs.nixfmt-rfc-style pkgs.nixfmt-rfc-style