nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix
Simon Vandel Sillesen fecea0b305 qbittorrent: 3.2.3 -> 3.3.1
* upstream has switched to qt5 as default, so also done here
* Adds a patch to use the qt lrelease tool correct
2016-01-02 22:47:28 +01:00

46 lines
1.3 KiB
Nix

{ stdenv, fetchurl, pkgconfig, which
, boost, libtorrentRasterbar, qt5
, debugSupport ? false # Debugging
, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
, webuiSupport ? true # WebUI
}:
assert guiSupport -> (dbus_libs != null);
with stdenv.lib;
stdenv.mkDerivation rec {
name = "qbittorrent-${version}";
version = "3.3.1";
src = fetchurl {
url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
sha256 = "1li9law732n4vc7sn6i92pwxn8li7ypqaxcmfpm17kk978immlfs";
};
nativeBuildInputs = [ pkgconfig which ];
buildInputs = [ boost libtorrentRasterbar qt5.qtbase qt5.qttools ]
++ optional guiSupport dbus_libs;
configureFlags = [
"--with-boost-libdir=${boost.lib}/lib"
"--with-boost=${boost.dev}"
(if guiSupport then "" else "--disable-gui")
(if webuiSupport then "" else "--disable-webui")
] ++ optional debugSupport "--enable-debug";
# The lrelease binary is named lrelease instead of lrelease-qt4
patches = [ ./fix-lrelease.patch];
# https://github.com/qbittorrent/qBittorrent/issues/1992
enableParallelBuilding = false;
meta = {
description = "Free Software alternative to µtorrent";
homepage = http://www.qbittorrent.org/;
license = licenses.gpl2;
maintainers = with maintainers; [ viric ];
platforms = platforms.linux;
};
}