summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorcodyopel <codyopel@gmail.com>2015-02-15 17:43:39 -0500
committercodyopel <codyopel@gmail.com>2015-02-15 17:43:39 -0500
commite9c0bdb93edeaf8acd1a80464c63bf81d3296f83 (patch)
tree9d0d447df5a2882471dcfa3bc0d8a8da29aede90 /pkgs/applications/networking
parentf114979de73e93288318055e3974e37c5ee05506 (diff)
downloadnixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.tar
nixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.tar.gz
nixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.tar.bz2
nixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.tar.lz
nixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.tar.xz
nixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.tar.zst
nixlib-e9c0bdb93edeaf8acd1a80464c63bf81d3296f83.zip
qbittorrent: add gui & webui optionals
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/p2p/qbittorrent/default.nix35
1 files changed, 23 insertions, 12 deletions
diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix
index 51c43771bcf7..f0e5a1c13e14 100644
--- a/pkgs/applications/networking/p2p/qbittorrent/default.nix
+++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -1,31 +1,42 @@
-{ stdenv, fetchurl, qt4, which, dbus_libs, boost, libtorrentRasterbar
-, pkgconfig }:
+{ stdenv, fetchurl, pkgconfig, which
+, boost, libtorrentRasterbar, qt4
+, debugSupport ? false # Debugging
+, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
+, webuiSupport ? true # WebUI
+}:
 
+assert guiSupport -> (dbus_libs != null);
+
+with stdenv.lib;
 stdenv.mkDerivation rec {
-  name = "qbittorrent-3.1.11";
+  name = "qbittorrent-${version}";
+  version = "3.1.11";
 
   src = fetchurl {
     url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
     sha256 = "0qvz8ifk01b9sw9x5yh3b5kmssx5yi026zvgvabdvfaqkvcmw43i";
   };
 
-  buildInputs = [
-    qt4 which dbus_libs boost libtorrentRasterbar pkgconfig
-  ];
+  nativeBuildInputs = [ pkgconfig which ];
+
+  buildInputs = [ boost libtorrentRasterbar qt4 ]
+    ++ optional guiSupport dbus_libs;
 
   configureFlags = [
     "--with-libboost-lib=${boost.lib}/lib"
     "--with-libboost-inc=${boost.dev}/include"
-  ];
+    (if guiSupport then "" else "--disable-gui")
+    (if webuiSupport then "" else "--disable-webui")
+  ] ++ optional debugSupport "--enable-debug";
 
   # https://github.com/qbittorrent/qBittorrent/issues/1992 
-  #enableParallelBuilding = true;
+  enableParallelBuilding = false;
 
-  meta = with stdenv.lib; {
+  meta = {
     description = "Free Software alternative to µtorrent";
-    homepage = http://www.qbittorrent.org/;
-    license = licenses.gpl2;
+    homepage    = http://www.qbittorrent.org/;
+    license     = licenses.gpl2;
     maintainers = with maintainers; [ viric ];
-    platforms = platforms.linux;
+    platforms   = platforms.linux;
   };
 }