diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix index 5efd6910043..cdd96d04aff 100644 --- a/pkgs/applications/networking/p2p/qbittorrent/default.nix +++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -1,11 +1,13 @@ -{ mkDerivation, lib, fetchFromGitHub, pkgconfig +{ mkDerivation, lib, fetchFromGitHub, makeWrapper, pkgconfig , boost, libtorrentRasterbar, qtbase, qttools, qtsvg , debugSupport ? false , guiSupport ? true, dbus ? null # GUI OR headless , webuiSupport ? true # WebUI +, trackerSearch ? true, python3 ? null }: assert guiSupport -> (dbus != null); +assert trackerSearch -> (python3 != null); with lib; mkDerivation rec { @@ -19,10 +21,11 @@ mkDerivation rec { sha256 = "17ih00q7idrpl3b2vgh4smva6lazs5jw06pblriscn1lrwdvrc38"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ makeWrapper pkgconfig ]; buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ] - ++ optional guiSupport dbus; # D(esktop)-Bus depends on GUI support + ++ optional guiSupport dbus # D(esktop)-Bus depends on GUI support + ++ optional trackerSearch python3; # Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist. QMAKE_LRELEASE = "lrelease"; @@ -34,6 +37,12 @@ mkDerivation rec { ++ optional (!webuiSupport) "--disable-webui" ++ optional debugSupport "--enable-debug"; + postInstall = "wrapProgram $out/bin/${ + if guiSupport + then "qbittorrent" + else "qbittorrent-nox" + } --prefix PATH : ${makeBinPath [ python3 ]}"; + enableParallelBuilding = true; meta = {