diff options
| author | seth <[email protected]> | 2024-06-30 09:40:43 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-30 09:40:43 -0400 |
| commit | 509221abec375464985cb45eaf4636e361c13b41 (patch) | |
| tree | 412bded195b8b90548725c3150adee5970a87965 | |
| parent | 842c3f225677aa55e44b94342f19c8f3e6f2be06 (diff) | |
feat: add nixfmt check (#3)
| -rw-r--r-- | checks/nixfmt/package.nix | 10 | ||||
| -rw-r--r-- | test/flake.nix | 3 |
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"]; }); } |
