multitenant-tvix-binary-cache/default.nix

48 lines
891 B
Nix
Raw Normal View History

2024-07-22 16:02:26 +00:00
{
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$";
};
2024-08-14 16:54:02 +00:00
# Rust
cargo-check.enable = true;
rustfmt.enable = true;
2024-07-22 16:02:26 +00:00
# Misc Hooks
commitizen.enable = true;
};
};
in
{
inherit pkgs;
shell = pkgs.mkShell {
name = "multitenant-tvix-binary-cache";
buildInputs = check.enabledPackages ++ [
pkgs.cargo
2024-09-22 21:12:40 +00:00
pkgs.cargo-edit
2024-07-22 16:02:26 +00:00
pkgs.protobuf
pkgs.rustc
pkgs.rust-analyzer
(pkgs.rustfmt.override { asNightly = true; })
];
shellHook = ''
${check.shellHook}
'';
};
}