aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
new file mode 100644
index 000000000000..964752f3b85d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -0,0 +1,47 @@
+{ mkDerivation, lib, fetchFromGitHub, pkgconfig
+, boost, libtorrentRasterbar, qtbase, qttools, qtsvg
+, debugSupport ? false # Debugging
+, guiSupport ? true, dbus ? null # GUI (disable to run headless)
+, webuiSupport ? true # WebUI
+}:
+
+assert guiSupport -> (dbus != null);
+with lib;
+
+mkDerivation rec {
+ pname = "qbittorrent";
+ version = "4.2.5";
+
+ src = fetchFromGitHub {
+ owner = "qbittorrent";
+ repo = "qbittorrent";
+ rev = "release-${version}";
+ sha256 = "1n613ylg6i9gisgk0dbr2kpfasyizrkdjff1r8smd4vri2qrdksn";
+ };
+
+ # NOTE: 2018-05-31: CMake is working but it is not officially supported
+ nativeBuildInputs = [ pkgconfig ];
+
+ buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
+ ++ optional guiSupport dbus; # D(esktop)-Bus depends on GUI support
+
+ # Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
+ QMAKE_LRELEASE = "lrelease";
+
+ configureFlags = [
+ "--with-boost-libdir=${boost.out}/lib"
+ "--with-boost=${boost.dev}" ]
+ ++ optionals (!guiSupport) [ "--disable-gui" "--enable-systemd" ] # Also place qbittorrent-nox systemd service files
+ ++ optional (!webuiSupport) "--disable-webui"
+ ++ optional debugSupport "--enable-debug";
+
+ enableParallelBuilding = true;
+
+ meta = {
+ description = "Featureful free software BitTorrent client";
+ homepage = "https://www.qbittorrent.org/";
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ Anton-Latukha ];
+ };
+}