about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/p2p/qbittorrent
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/p2p/qbittorrent
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/p2p/qbittorrent')
-rw-r--r--nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix b/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
new file mode 100644
index 000000000000..81c493fedcf1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, 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 stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "qbittorrent-${version}";
+  version = "4.1.5";
+
+  src = fetchFromGitHub {
+    owner = "qbittorrent";
+    repo = "qbittorrent";
+    rev = "release-${version}";
+    sha256 = "09zcygaxfv9g6av0vsvlyzv4v65wvj766xyfx31yz5ig3xan6ak1";
+  };
+
+  # 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 ];
+  };
+}