2019-08-08 20:33:45 +01:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, pkgconfig
|
2017-11-22 12:02:40 +00:00
|
|
|
, boost, libtorrentRasterbar, qtbase, qttools, qtsvg
|
2015-02-15 22:43:39 +00:00
|
|
|
, debugSupport ? false # Debugging
|
2018-06-01 07:02:28 +01:00
|
|
|
, guiSupport ? true, dbus ? null # GUI (disable to run headless)
|
2015-02-15 22:43:39 +00:00
|
|
|
, webuiSupport ? true # WebUI
|
|
|
|
}:
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2018-06-01 07:02:28 +01:00
|
|
|
assert guiSupport -> (dbus != null);
|
2019-08-08 20:33:45 +01:00
|
|
|
with lib;
|
2017-10-01 00:38:28 +01:00
|
|
|
|
2019-08-08 20:33:45 +01:00
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "qbittorrent";
|
2020-11-06 21:17:42 +00:00
|
|
|
version = "4.3.0.1";
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2018-06-01 07:02:28 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qbittorrent";
|
|
|
|
repo = "qbittorrent";
|
|
|
|
rev = "release-${version}";
|
2020-11-06 21:17:42 +00:00
|
|
|
sha256 = "068sf24mjvc2idimgpzvf7gjk8n9xrr3qqlqfx5j3j598ckm3yfp";
|
2013-11-08 08:59:28 +00:00
|
|
|
};
|
|
|
|
|
2018-06-01 07:02:28 +01:00
|
|
|
# NOTE: 2018-05-31: CMake is working but it is not officially supported
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2015-02-15 22:43:39 +00:00
|
|
|
|
2017-11-22 12:02:40 +00:00
|
|
|
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
|
2018-06-01 07:02:28 +01:00
|
|
|
++ optional guiSupport dbus; # D(esktop)-Bus depends on GUI support
|
2014-11-01 02:30:37 +00:00
|
|
|
|
2017-11-09 12:20:28 +00:00
|
|
|
# Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
|
|
|
|
QMAKE_LRELEASE = "lrelease";
|
|
|
|
|
2014-11-01 02:30:37 +00:00
|
|
|
configureFlags = [
|
2016-04-27 22:41:28 +01:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2018-06-01 07:02:28 +01:00
|
|
|
"--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";
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2017-10-01 00:38:28 +01:00
|
|
|
enableParallelBuilding = true;
|
2013-11-08 08:59:28 +00:00
|
|
|
|
2015-02-15 22:43:39 +00:00
|
|
|
meta = {
|
2018-06-01 07:02:28 +01:00
|
|
|
description = "Featureful free software BitTorrent client";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.qbittorrent.org/";
|
2015-02-15 22:43:39 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2018-07-22 20:50:19 +01:00
|
|
|
maintainers = with maintainers; [ Anton-Latukha ];
|
2013-11-08 08:59:28 +00:00
|
|
|
};
|
|
|
|
}
|