summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--checks/nixfmt/package.nix10
-rw-r--r--test/flake.nix3
2 files changed, 12 insertions, 1 deletions
diff --git a/checks/nixfmt/package.nix b/checks/nixfmt/package.nix
new file mode 100644
index 0000000..ab4d88c
--- /dev/null
+++ b/checks/nixfmt/package.nix
@@ -0,0 +1,10 @@
+{
+ lib,
+ runCommand,
+ nixfmt-rfc-style,
+ root,
+}:
+runCommand "check-nixfmt" {} ''
+ ${lib.getExe nixfmt-rfc-style} --check ${root}
+ touch $out
+''
diff --git a/test/flake.nix b/test/flake.nix
index fb4547c..fdf8833 100644
--- a/test/flake.nix
+++ b/test/flake.nix
@@ -16,6 +16,7 @@
root = ../.;
};
in {
- checks = flake-checks';
+ # we use alejandra, so nixfmt will always fail
+ checks = builtins.removeAttrs flake-checks' ["nixfmt"];
});
}