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.
This commit is contained in:
Anton-Latukha 2020-12-12 13:11:20 +02:00 committed by Milan
parent e569d6b98c
commit cb312f3d03

View file

@ -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 = {