From cb312f3d03dbaf2d60e2fd3917ba2e5d41ffe631 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 12 Dec 2020 13:11:20 +0200 Subject: [PATCH] qbittorrent: add default trackerSearch option, include python3 Since people regularly open reports about tracker search not working because python is not found. And since Tracker Search in qBittorrent can not be disabled & at the same time the Pythong is needed for it to work - including Python for default functionality to work. --- .../networking/p2p/qbittorrent/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 = {