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

45 lines
1.3 KiB
Nix
Raw Normal View History

2015-02-15 22:43:39 +00:00
{ stdenv, fetchurl, pkgconfig, which
2017-11-22 12:02:40 +00:00
, boost, libtorrentRasterbar, qtbase, qttools, qtsvg
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}";
2018-02-21 17:02:55 +00:00
version = "4.0.4";
2013-11-08 08:59:28 +00:00
src = fetchurl {
url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
2018-02-21 17:02:55 +00:00
sha256 = "13sw0sdw2agm49plp9xvkg6wva274drpvgz76dqj4j2kfxx9s2jk";
2013-11-08 08:59:28 +00:00
};
nativeBuildInputs = [ pkgconfig which ];
2015-02-15 22:43:39 +00:00
2017-11-22 12:02:40 +00:00
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
2015-02-15 22:43:39 +00:00
++ optional guiSupport dbus_libs;
2014-11-01 02:30:37 +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 = [
"--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
enableParallelBuilding = true;
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";
homepage = https://www.qbittorrent.org/;
2015-02-15 22:43:39 +00:00
license = licenses.gpl2;
platforms = platforms.linux;
2017-02-16 13:10:07 +00:00
maintainers = with maintainers; [ viric ];
2013-11-08 08:59:28 +00:00
};
}