2024-07-22 16:02:26 +00:00
|
|
|
{
|
|
|
|
sources ? import ./npins,
|
2024-12-26 23:56:39 +00:00
|
|
|
pkgs ? import sources.nixpkgs {},
|
2024-07-22 16:02:26 +00:00
|
|
|
}:
|
|
|
|
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;
|
2024-12-26 23:56:39 +00:00
|
|
|
package = pkgs.callPackage ./pkgs {};
|
2024-07-22 16:02:26 +00:00
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|