lix-installer/nix/check.nix
Ana Hobden 444a9fd8f2
Nix flake checks now do ci-checks (#88)
* Nix flake checks now do ci-checks

* Make sure checks actually run
2022-12-05 10:27:12 -08:00

45 lines
927 B
Nix

{ pkgs, eclint, 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 ba,sur,crate,pullrequest,pullrequests,ser \
--skip target \
.
'';
});
# NixFormatting
check-nixpkgs-fmt = (writeShellApplication {
name = "check-nixpkgs-fmt";
runtimeInputs = with pkgs; [ git nixpkgs-fmt findutils ];
text = ''
nixpkgs-fmt --check .
'';
});
# EditorConfig
check-editorconfig = (writeShellApplication {
name = "check-editorconfig";
runtimeInputs = with pkgs; [ eclint ];
text = ''
eclint .
'';
});
}