jtojnar / nixpkgs-hammering

Beat your package expressions into a shape
MIT License
249 stars 15 forks source link

build-tools-in-build-inputs shows wrong code snippet #66

Open SuperSandro2000 opened 3 years ago

SuperSandro2000 commented 3 years ago

nixpkgs-hammer murmur --exclude attribute-ordering shows the buildInputs for mumble and not murmur.

warning: build-tools-in-build-inputs
which is a build tool so it likely goes to `nativeBuildInputs`, not `buildInputs`.

Near /home/hotpi/.cache/nixpkgs-review/pr-113796/nixpkgs/pkgs/applications/networking/mumble/default.nix:31:5:
   |
31 |     buildInputs = [ boost protobuf avahi ]
   |     ^
See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/build-tools-in-build-inputs.md
jtojnar commented 3 years ago

That is in a generic function that mumble shares with murmur.

Hmm, I wonder how attribute-ordering behaves with attributes split over multiple places.

jtojnar commented 3 years ago

Oh, it is mentioning which, which is in the override:

https://github.com/NixOS/nixpkgs/blob/9ab61d974edc9afa3412b980a05c1c6b20b0bc37/pkgs/applications/networking/mumble/default.nix#L127

Maybe we will need to switch to syntactical check here as well since technically which is member of this attribute:

https://github.com/NixOS/nixpkgs/blob/9ab61d974edc9afa3412b980a05c1c6b20b0bc37/pkgs/applications/networking/mumble/default.nix#L32