20 , trackerSearch ? true
27 qtVersion = lib.versions.major qtbase.version;
29 stdenv.mkDerivation rec {
31 + lib.optionalString (!guiSupport) "-nox";
34 src = fetchFromGitHub {
35 owner = "qbittorrent";
37 rev = "release-${version}";
38 hash = "sha256-iwqJaRfwJTL6SimWTNqqqFPXxSKrgo6whYY70llZyGs";
54 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
56 ] ++ lib.optionals guiSupport [
58 ] ++ lib.optionals (guiSupport && stdenv.hostPlatform.isLinux) [
60 ] ++ lib.optionals trackerSearch [
64 cmakeFlags = lib.optionals (!guiSupport) [
67 "-DSYSTEMD_SERVICES_INSTALL_DIR=${placeholder "out"}/lib/systemd/system"
68 ] ++ lib.optionals (!webuiSupport) [
72 qtWrapperArgs = lib.optionals trackerSearch [
73 "--prefix PATH : ${lib.makeBinPath [ python3 ]}"
78 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
79 APP_NAME=qbittorrent${lib.optionalString (!guiSupport) "-nox"}
80 mkdir -p $out/{Applications,bin}
81 cp -R $APP_NAME.app $out/Applications
82 makeWrapper $out/{Applications/$APP_NAME.app/Contents/MacOS,bin}/$APP_NAME
86 qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
90 description = "Featureful free software BitTorrent client";
91 homepage = "https://www.qbittorrent.org";
92 changelog = "https://github.com/qbittorrent/qBittorrent/blob/release-${version}/Changelog";
93 license = licenses.gpl2Plus;
94 platforms = platforms.unix;
95 maintainers = with maintainers; [ Anton-Latukha kashw2 ];
98 + lib.optionalString (!guiSupport) "-nox";