12 version = "unstable-2024-03-25";
14 src = fetchFromGitHub {
16 repo = "nixpkgs-hammering";
17 rev = "6851ecea8c6da45870b7c06d6495cba3fb2d7c7c";
18 hash = "sha256-kr3zMr7aWt4W/+Jcol5Ctiq0KjXSxViPhGtyqvX9dqE=";
22 description = "Set of nit-picky rules that aim to point out and explain common mistakes in nixpkgs package pull requests";
23 homepage = "https://github.com/jtojnar/nixpkgs-hammering";
24 license = licenses.mit;
25 maintainers = with maintainers; [ figsoda ];
28 rust-checks = rustPlatform.buildRustPackage {
29 pname = "nixpkgs-hammering-rust-checks";
30 inherit version src meta;
31 sourceRoot = "${src.name}/rust-checks";
32 cargoHash = "sha256-QrtAalZClNc0ZN6iNqN9rFRQ7w68lEZPV5e25uXYToA=";
37 pname = "nixpkgs-hammering";
41 nativeBuildInputs = [ makeWrapper ];
43 buildInputs = [ python3 ];
48 AST_CHECK_NAMES=$(find ${rust-checks}/bin -maxdepth 1 -type f -printf "%f:")
50 install -Dt $out/bin tools/nixpkgs-hammer
51 wrapProgram $out/bin/nixpkgs-hammer \
52 --prefix PATH : ${lib.makeBinPath [ nix rust-checks ]} \
53 --set AST_CHECK_NAMES ''${AST_CHECK_NAMES%:}
55 cp -r lib overlays $out
60 passthru.updateScript = unstableGitUpdater { };
63 mainProgram = "nixpkgs-hammer";