NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.46k stars 12.95k forks source link

qbittorrent-nox: missing meta.mainProgram #322456

Open Mojken opened 1 week ago

Mojken commented 1 week ago

No bug so skipping the steps-to-reproduce stuff and all that. It works as it is, but throws a warning.

Needed for things like lib.getExe, which is a common pattern in systemd services - something very reasonable to assume people would want for a package like this.

https://github.com/NixOS/nixpkgs/blob/e4509b3a560c87a8d4cb6f9992b8915abf9e36d8/pkgs/applications/networking/p2p/qbittorrent/default.nix#L92-L99

Suggested fix: mainProgram = "qbittorrent-nox";

@Anton-Latukha @kashw2

eclairevoyant commented 1 week ago

feel free to send a PR yourself :) it's not restricted to maintainers

kashw2 commented 1 week ago

As qbittorrent has three varients in nixpkgs (qbittorrent-nox, qbittorrent-qt and qbittorrent). I'm not sure what one we want to specify as the actual main program. We could use the same logic we use to separate the pnames.

Mojken commented 1 week ago

As qbittorrent has three varients in nixpkgs (qbittorrent-nox, qbittorrent-qt and qbittorrent). I'm not sure what one we want to specify as the actual main program. We could use the same logic we use to separate the pnames.

Oh, wow, I didn't even notice they were the same package. I mean, we should be able to figure it out using something like qbittorrent${lib.optionalString (!guiSupport) "-nox"}, right? Maybe something extra for -qt as well?

EDIT: Oh and that's exactly what you've done, too. Gotta read before I write. My bad!