3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyqt/5.x.nix
Dmitry Kalinkin facefec139
pyqt5: make qtwebkit optional, disable by default
qtwebkit appears to be unsupported in Qt 5.11. We are using some old port
475d653afd/pkgs/development/libraries/qt-5/5.11/default.nix (L39-L48)
and it is broken on darwin.
2018-12-27 09:14:20 -05:00

77 lines
2 KiB
Nix

{ lib, fetchurl, fetchpatch, pythonPackages, pkgconfig
, qmake, lndir, qtbase, qtsvg, qtwebengine, dbus
, withConnectivity ? false, qtconnectivity
, withWebKit ? false, qtwebkit
, withWebSockets ? false, qtwebsockets
}:
let
pname = "PyQt";
version = "5.11.3";
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;
sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; };
in buildPythonPackage {
pname = pname;
version = version;
format = "other";
meta = with lib; {
description = "Python bindings for Qt5";
homepage = http://www.riverbankcomputing.co.uk;
license = licenses.gpl3;
platforms = platforms.mesaPlatforms;
maintainers = with maintainers; [ sander ];
};
src = fetchurl {
url = "mirror://sourceforge/pyqt/PyQt5/PyQt-${version}/PyQt5_gpl-${version}.tar.gz";
sha256 = "0wqh4srqkcc03rvkwrcshaa028psrq58xkys6npnyhqxc0apvdf9";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkgconfig qmake lndir ];
buildInputs = [ dbus sip ];
propagatedBuildInputs = [ qtbase qtsvg qtwebengine ]
++ lib.optional (!isPy3k) enum34
++ lib.optional withConnectivity qtconnectivity
++ lib.optional withWebKit qtwebkit
++ lib.optional withWebSockets qtwebsockets;
configurePhase = ''
runHook preConfigure
mkdir -p $out
lndir ${dbus-python} $out
rm -rf "$out/nix-support"
export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
${python.executable} configure.py -w \
--confirm-license \
--dbus=${dbus.dev}/include/dbus-1.0 \
--no-qml-plugin \
--bindir=$out/bin \
--destdir=$out/${python.sitePackages} \
--stubsdir=$out/${python.sitePackages}/PyQt5 \
--sipdir=$out/share/sip/PyQt5 \
--designer-plugindir=$out/plugins/designer
runHook postConfigure
'';
postInstall = ''
ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/
for i in $out/bin/*; do
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
done
'';
enableParallelBuilding = true;
}