binary-cache/default.nix
2024-07-06 11:31:26 +02:00

37 lines
699 B
Nix

{
sources ? import ./npins,
nixpkgs ? sources.nixpkgs,
pkgs ? import nixpkgs { overlays = [ (import ./pkgs/overlay.nix) ]; },
}:
let
check = (import sources.git-hooks).run {
src = ./.;
hooks = {
# Nix Hooks
statix.enable = true;
deadnix.enable = true;
rfc101 = {
enable = true;
name = "RFC-101 formatting";
entry = "${pkgs.lib.getExe pkgs.nixfmt-rfc-style}";
files = "\\.nix$";
};
# Misc Hooks
commitizen.enable = true;
};
};
in
{
inherit pkgs;
shell = pkgs.mkShell {
name = "binary-cache";
buildInputs = check.enabledPackages;
shellHook = ''
${check.shellHook}
'';
};
}