forked from mirrors/nixpkgs
a75d04a970
This version contains among other things a fix for a too restrictive XSS filter. See the full change log at https://www.qbittorrent.org/news.php
50 lines
1.4 KiB
Nix
50 lines
1.4 KiB
Nix
{ stdenv, fetchurl, pkgconfig, which
|
|
, boost, libtorrentRasterbar, qtbase, qttools
|
|
, 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.15";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
|
|
sha256 = "1bnfnbkdg0088h25zzhlpcdh30y0k1m76bkhjsj1aali765c1fx7";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig which ];
|
|
|
|
buildInputs = [ boost libtorrentRasterbar qtbase qttools ]
|
|
++ optional guiSupport dbus_libs;
|
|
|
|
preConfigure = ''
|
|
export QT_QMAKE=$(dirname "$QMAKE")
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--with-boost-libdir=${boost.out}/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;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ viric ];
|
|
};
|
|
}
|