2015-02-15 22:43:39 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, which
|
2016-04-28 17:10:37 +01:00
|
|
|
, boost, libtorrentRasterbar, qmakeHook, qt5
|
2015-02-15 22:43:39 +00:00
|
|
|
, debugSupport ? false # Debugging
|
|
|
|
, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
|
|
|
|
, webuiSupport ? true # WebUI
|
|
|
|
}:
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2015-02-15 22:43:39 +00:00
|
|
|
assert guiSupport -> (dbus_libs != null);
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2013-11-08 08:59:28 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-15 22:43:39 +00:00
|
|
|
name = "qbittorrent-${version}";
|
2016-06-27 10:00:33 +01:00
|
|
|
version = "3.3.5";
|
2013-11-08 08:59:28 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
|
2016-06-27 10:00:33 +01:00
|
|
|
sha256 = "1nh4lr4kbgh6rrsjax2a4lg82vn1ld0rnqjpp7sb6vpz8ikavk9q";
|
2013-11-08 08:59:28 +00:00
|
|
|
};
|
|
|
|
|
2016-05-30 22:30:06 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig which ];
|
2015-02-15 22:43:39 +00:00
|
|
|
|
2016-01-01 21:23:51 +00:00
|
|
|
buildInputs = [ boost libtorrentRasterbar qt5.qtbase qt5.qttools ]
|
2015-02-15 22:43:39 +00:00
|
|
|
++ optional guiSupport dbus_libs;
|
2014-11-01 02:30:37 +00:00
|
|
|
|
2016-04-28 17:10:37 +01:00
|
|
|
preConfigure = ''
|
2016-05-30 22:30:06 +01:00
|
|
|
export QT_QMAKE=$(dirname "$QMAKE")
|
2016-04-28 17:10:37 +01:00
|
|
|
'';
|
|
|
|
|
2014-11-01 02:30:37 +00:00
|
|
|
configureFlags = [
|
2016-04-27 22:41:28 +01:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2015-08-13 03:02:30 +01:00
|
|
|
"--with-boost=${boost.dev}"
|
2015-02-15 22:43:39 +00:00
|
|
|
(if guiSupport then "" else "--disable-gui")
|
|
|
|
(if webuiSupport then "" else "--disable-webui")
|
|
|
|
] ++ optional debugSupport "--enable-debug";
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2016-01-01 21:23:51 +00:00
|
|
|
# The lrelease binary is named lrelease instead of lrelease-qt4
|
|
|
|
patches = [ ./fix-lrelease.patch];
|
|
|
|
|
2015-09-02 19:22:32 +01:00
|
|
|
# https://github.com/qbittorrent/qBittorrent/issues/1992
|
|
|
|
enableParallelBuilding = false;
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2015-02-15 22:43:39 +00:00
|
|
|
meta = {
|
2013-11-08 08:59:28 +00:00
|
|
|
description = "Free Software alternative to µtorrent";
|
2015-02-15 22:43:39 +00:00
|
|
|
homepage = http://www.qbittorrent.org/;
|
|
|
|
license = licenses.gpl2;
|
2014-09-25 03:49:14 +01:00
|
|
|
maintainers = with maintainers; [ viric ];
|
2015-02-15 22:43:39 +00:00
|
|
|
platforms = platforms.linux;
|
2013-11-08 08:59:28 +00:00
|
|
|
};
|
|
|
|
}
|