mirror of
https://github.com/hsjobeki/noogle.git
synced 2024-12-18 19:31:37 +03:00
41 lines
932 B
Nix
41 lines
932 B
Nix
{ self, ... }: {
|
|
perSystem =
|
|
{ pkgs
|
|
, self'
|
|
, system
|
|
, ...
|
|
}:
|
|
let
|
|
formatters = with pkgs; [
|
|
nixfmt
|
|
nodePackages.prettier #3.0.0 installed over nixpkgs
|
|
rustfmt
|
|
];
|
|
in
|
|
{
|
|
checks.pre-commit-check = self.inputs.pre-commit-hooks.lib.${system}.run {
|
|
src = ./.;
|
|
hooks = {
|
|
treefmt.enable = true;
|
|
statix.enable = true;
|
|
};
|
|
excludes = [ "indexer/test" ".github" "scripts/data" "test_data" ];
|
|
settings = {
|
|
statix.ignore = [ "indexer/test" "test_data" ];
|
|
nixfmt.width = 80;
|
|
treefmt.package = pkgs.writeShellApplication {
|
|
name = "treefmt";
|
|
runtimeInputs =
|
|
[
|
|
pkgs.treefmt
|
|
]
|
|
++ formatters;
|
|
text = ''
|
|
exec treefmt "$@"
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|