mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
flake/pre-commit: check maintainers when modified
This commit is contained in:
parent
5c929a161f
commit
c4135d720a
1 changed files with 13 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -60,11 +60,23 @@
|
||||||
// lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
|
// lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
|
||||||
pre-commit = {
|
pre-commit = {
|
||||||
# We have a treefmt check already, so this is redundant.
|
# We have a treefmt check already, so this is redundant.
|
||||||
|
# We also can't run the test if it includes running `nix build`,
|
||||||
|
# since the nix CLI can't build within a derivation builder.
|
||||||
check.enable = false;
|
check.enable = false;
|
||||||
|
|
||||||
settings.hooks = {
|
settings.hooks = {
|
||||||
treefmt.enable = true;
|
treefmt.enable = true;
|
||||||
typos.enable = true;
|
typos.enable = true;
|
||||||
|
maintainers = {
|
||||||
|
enable = true;
|
||||||
|
name = "maintainers";
|
||||||
|
description = "Check maintainers when it is modified.";
|
||||||
|
files = "^lib/maintainers[.]nix$";
|
||||||
|
package = pkgs.nix;
|
||||||
|
entry = "nix build --no-link --print-build-logs";
|
||||||
|
args = [ ".#checks.${system}.maintainers" ];
|
||||||
|
pass_filenames = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue