diff options
Diffstat (limited to 'src/x509-info/nix/check.nix')
| -rw-r--r-- | src/x509-info/nix/check.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/x509-info/nix/check.nix b/src/x509-info/nix/check.nix new file mode 100644 index 0000000..4d7743c --- /dev/null +++ b/src/x509-info/nix/check.nix @@ -0,0 +1,44 @@ +{ pkgs, toolchain }: + +let + inherit (pkgs) writeShellApplication; +in +{ + + # Format + check-rustfmt = (writeShellApplication { + name = "check-rustfmt"; + runtimeInputs = [ toolchain ]; + text = "cargo fmt --check"; + }); + + # Spelling + check-spelling = (writeShellApplication { + name = "check-spelling"; + runtimeInputs = with pkgs; [ git codespell ]; + text = '' + codespell \ + --ignore-words-list="crate" \ + --skip="./target,.git" \ + . + ''; + }); + + # NixFormatting + check-nixpkgs-fmt = (writeShellApplication { + name = "check-nixpkgs-fmt"; + runtimeInputs = with pkgs; [ git nixpkgs-fmt findutils ]; + text = '' + nixpkgs-fmt --check . + ''; + }); + + # Semver + check-semver = (writeShellApplication { + name = "check-semver"; + runtimeInputs = with pkgs; [ cargo-semver-checks ]; + text = '' + cargo-semver-checks semver-checks check-release + ''; + }); +} |
