27 lines
490 B
Nix
27 lines
490 B
Nix
{
|
|
pkgs,
|
|
git-hooks,
|
|
...
|
|
}:
|
|
let
|
|
check-command = command: {
|
|
enable = true;
|
|
name = command;
|
|
entry = command;
|
|
pass_filenames = false;
|
|
stages = [ "pre-commit" ];
|
|
};
|
|
in
|
|
{
|
|
git-hooks = git-hooks.lib.${pkgs.system}.run {
|
|
src = ./..;
|
|
hooks = {
|
|
nixfmt-rfc-style.enable = true;
|
|
cargo-check.enable = true;
|
|
convco.enable = true;
|
|
cargo-test = check-command "cargo test";
|
|
clippy.enable = true;
|
|
rustfmt.enable = true;
|
|
};
|
|
};
|
|
}
|