2015-02-15 14:43:39 -08:00
|
|
|
{ stdenv, fetchurl, pkgconfig, which
|
2017-07-01 04:29:30 -07:00
|
|
|
, boost, libtorrentRasterbar, qtbase, qttools
|
2015-02-15 14:43:39 -08:00
|
|
|
, debugSupport ? false # Debugging
|
|
|
|
, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
|
|
|
|
, webuiSupport ? true # WebUI
|
|
|
|
}:
|
2013-11-08 00:59:28 -08:00
|
|
|
|
2015-02-15 14:43:39 -08:00
|
|
|
assert guiSupport -> (dbus_libs != null);
|
|
|
|
with stdenv.lib;
|
2017-09-30 16:38:28 -07:00
|
|
|
|
2013-11-08 00:59:28 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-15 14:43:39 -08:00
|
|
|
name = "qbittorrent-${version}";
|
2017-09-30 16:38:28 -07:00
|
|
|
version = "3.3.16";
|
2013-11-08 00:59:28 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
|
2017-09-30 16:38:28 -07:00
|
|
|
sha256 = "0mxyn2pajvb55bhcaz55v64p2xzy15p0yy174s62b5y3f8cac27a";
|
2013-11-08 00:59:28 -08:00
|
|
|
};
|
|
|
|
|
2017-07-01 04:29:30 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig which ];
|
2015-02-15 14:43:39 -08:00
|
|
|
|
2017-06-02 08:40:19 -07:00
|
|
|
buildInputs = [ boost libtorrentRasterbar qtbase qttools ]
|
2015-02-15 14:43:39 -08:00
|
|
|
++ optional guiSupport dbus_libs;
|
2014-10-31 19:30:37 -07:00
|
|
|
|
2017-11-09 04:20:28 -08:00
|
|
|
# Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
|
|
|
|
QMAKE_LRELEASE = "lrelease";
|
|
|
|
|
2014-10-31 19:30:37 -07:00
|
|
|
configureFlags = [
|
2016-04-27 14:41:28 -07:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2015-08-12 19:02:30 -07:00
|
|
|
"--with-boost=${boost.dev}"
|
2015-02-15 14:43:39 -08:00
|
|
|
(if guiSupport then "" else "--disable-gui")
|
|
|
|
(if webuiSupport then "" else "--disable-webui")
|
|
|
|
] ++ optional debugSupport "--enable-debug";
|
2013-11-08 00:59:28 -08:00
|
|
|
|
2017-09-30 16:38:28 -07:00
|
|
|
enableParallelBuilding = true;
|
2013-11-08 00:59:28 -08:00
|
|
|
|
2015-02-15 14:43:39 -08:00
|
|
|
meta = {
|
2013-11-08 00:59:28 -08:00
|
|
|
description = "Free Software alternative to µtorrent";
|
2015-02-15 14:43:39 -08:00
|
|
|
homepage = http://www.qbittorrent.org/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2017-02-16 05:10:07 -08:00
|
|
|
maintainers = with maintainers; [ viric ];
|
2013-11-08 00:59:28 -08:00
|
|
|
};
|
|
|
|
}
|