diff options
Diffstat (limited to 'tvix/default.nix')
-rw-r--r-- | tvix/default.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tvix/default.nix b/tvix/default.nix index 43b942cef096..339a657efd5f 100644 --- a/tvix/default.nix +++ b/tvix/default.nix @@ -131,7 +131,31 @@ in ''; }; + # Run cargo clippy. We run it with -Dwarnings, so warnings cause a nonzero + # exit code. + clippy = pkgs.stdenv.mkDerivation { + inherit cargoDeps; + name = "tvix-clippy"; + src = depot.third_party.gitignoreSource ./.; + PROTO_ROOT = depot.tvix.proto; + + buildInputs = [ + pkgs.fuse + ]; + nativeBuildInputs = with pkgs; [ + cargo + clippy + pkg-config + protobuf + rustc + rustPlatform.cargoSetupHook + ]; + + buildPhase = "cargo clippy -- -Dwarnings | tee $out"; + }; + meta.ci.targets = [ + "clippy" "shell" "rust-docs" ]; |