diff options
| -rw-r--r-- | checks.nix | 37 | ||||
| -rw-r--r-- | flake.lock | 16 | ||||
| -rw-r--r-- | flake.nix | 19 |
3 files changed, 33 insertions, 39 deletions
diff --git a/checks.nix b/checks.nix deleted file mode 100644 index 93d387f..0000000 --- a/checks.nix +++ /dev/null @@ -1,37 +0,0 @@ -self: { - lib, - runCommand, - system, - actionlint, - fd, - statix, - nil, - ... -}: let - formatter = self.formatter.${system}; -in { - check-actionlint = runCommand "check-actionlint" {} '' - ${lib.getExe actionlint} ${./.github/workflows}/* - - touch $out - ''; - - check-nil = runCommand "check-nil" {} '' - cd ${./.} - ${lib.getExe fd} . -e 'nix' | while read -r file; do - ${lib.getExe nil} diagnostics "$file" - done - - touch $out - ''; - - check-statix = runCommand "check-statix" {} '' - ${lib.getExe statix} check ${./.} - touch $out - ''; - - "check-${formatter.pname}" = runCommand "check-${formatter.pname}" {} '' - ${lib.getExe formatter} --check ${./.} - touch $out - ''; -} @@ -1,5 +1,20 @@ { "nodes": { + "flake-checks": { + "locked": { + "lastModified": 1716193450, + "narHash": "sha256-wIbyIQRoLAfGe2v8W7LM6zEZ9Oy0jKuUX0HMUCLQJsM=", + "owner": "getchoo", + "repo": "flake-checks", + "rev": "842c3f225677aa55e44b94342f19c8f3e6f2be06", + "type": "github" + }, + "original": { + "owner": "getchoo", + "repo": "flake-checks", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1716312448, @@ -18,6 +33,7 @@ }, "root": { "inputs": { + "flake-checks": "flake-checks", "nixpkgs": "nixpkgs" } } @@ -8,11 +8,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + # this can be removed with `inputs.flake-checks.follows = ""` + flake-checks.url = "github:getchoo/flake-checks"; }; outputs = { nixpkgs, - self, + flake-checks, ... }: let systems = [ @@ -24,7 +26,20 @@ forAllSystems = fn: nixpkgs.lib.genAttrs systems (sys: fn nixpkgs.legacyPackages.${sys}); in { - checks = forAllSystems (import ./checks.nix self); + checks = forAllSystems (pkgs: let + flake-checks' = flake-checks.lib.mkChecks { + root = ./.; + inherit pkgs; + }; + in { + inherit + (flake-checks') + actionlint + alejandra + deadnix + statix + ; + }); packages = forAllSystems ( { |
