nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2015-02-15 23:43:39 +01:00
{ stdenv, fetchurl, pkgconfig, which
, boost, libtorrentRasterbar, qt4
, debugSupport ? false # Debugging
, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
, webuiSupport ? true # WebUI
}:
2013-11-08 09:59:28 +01:00
2015-02-15 23:43:39 +01:00
assert guiSupport -> (dbus_libs != null);
with stdenv.lib;
2013-11-08 09:59:28 +01:00
stdenv.mkDerivation rec {
2015-02-15 23:43:39 +01:00
name = "qbittorrent-${version}";
version = "3.1.11";
2013-11-08 09:59:28 +01:00
src = fetchurl {
url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
2014-11-01 03:30:37 +01:00
sha256 = "0qvz8ifk01b9sw9x5yh3b5kmssx5yi026zvgvabdvfaqkvcmw43i";
2013-11-08 09:59:28 +01:00
};
2015-02-15 23:43:39 +01:00
nativeBuildInputs = [ pkgconfig which ];
buildInputs = [ boost libtorrentRasterbar qt4 ]
++ optional guiSupport dbus_libs;
2014-11-01 03:30:37 +01:00
configureFlags = [
"--with-libboost-lib=${boost.lib}/lib"
"--with-libboost-inc=${boost.dev}/include"
2015-02-15 23:43:39 +01:00
(if guiSupport then "" else "--disable-gui")
(if webuiSupport then "" else "--disable-webui")
] ++ optional debugSupport "--enable-debug";
2013-11-08 09:59:28 +01:00
# https://github.com/qbittorrent/qBittorrent/issues/1992
2015-02-15 23:43:39 +01:00
enableParallelBuilding = false;
2013-11-08 09:59:28 +01:00
2015-02-15 23:43:39 +01:00
meta = {
2013-11-08 09:59:28 +01:00
description = "Free Software alternative to µtorrent";
2015-02-15 23:43:39 +01:00
homepage = http://www.qbittorrent.org/;
license = licenses.gpl2;
2014-09-25 04:49:14 +02:00
maintainers = with maintainers; [ viric ];
2015-02-15 23:43:39 +01:00
platforms = platforms.linux;
2013-11-08 09:59:28 +01:00
};
}