From 2e7e1ce219b43bb74f67875200dd4b68758ffd27 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 16 Jul 2024 19:04:27 -0400 Subject: back to nixvim again --- dev/checks.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 dev/checks.nix (limited to 'dev/checks.nix') diff --git a/dev/checks.nix b/dev/checks.nix new file mode 100644 index 0000000..533c2a0 --- /dev/null +++ b/dev/checks.nix @@ -0,0 +1,45 @@ +{ + perSystem = + { lib, pkgs, ... }: + let + root = lib.fileset.toSource { + root = ../.; + fileset = lib.fileset.unions [ + ./. + ../.github + ../nixvim + ../flake.nix + ]; + }; + in + { + checks = { + format-and-lint = + pkgs.runCommand "format-and-lint" + { + src = root; + nativeBuildInputs = [ + pkgs.actionlint + pkgs.deadnix + pkgs.nixfmt-rfc-style + pkgs.statix + ]; + } + '' + echo "running actionlint..." + actionlint ./.github/workflows/* + + echo "running deadnix..." + deadnix + + echo "running nixfmt..." + nixfmt --check . + + echo "running statix..." + statix check . + + touch $out + ''; + }; + }; +} -- cgit v1.2.3