43 lines
793 B
Nix
43 lines
793 B
Nix
|
{
|
||
|
sources ? import ./npins,
|
||
|
pkgs ? import sources.nixpkgs { },
|
||
|
}:
|
||
|
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 = "multitenant-tvix-binary-cache";
|
||
|
buildInputs = check.enabledPackages ++ [
|
||
|
pkgs.cargo
|
||
|
pkgs.protobuf
|
||
|
pkgs.rustc
|
||
|
pkgs.rust-analyzer
|
||
|
(pkgs.rustfmt.override { asNightly = true; })
|
||
|
];
|
||
|
shellHook = ''
|
||
|
${check.shellHook}
|
||
|
'';
|
||
|
|
||
|
};
|
||
|
}
|