Merge pull request #52956 from orivej/sip-module

pythonPackages.sip: make sip-module name overridable
This commit is contained in:
Orivej Desh (NixOS) 2018-12-27 12:04:29 +00:00 committed by GitHub
commit 880de7a9bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View file

@ -8,7 +8,9 @@ let
pname = "PyQt";
version = "5.11.3";
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python sip enum34;
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;
sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; };
in buildPythonPackage {
pname = pname;
@ -32,10 +34,10 @@ in buildPythonPackage {
nativeBuildInputs = [ pkgconfig qmake lndir ];
buildInputs = [ dbus ];
buildInputs = [ dbus sip ];
propagatedBuildInputs = [
sip qtbase qtsvg qtwebkit qtwebengine
qtbase qtsvg qtwebkit qtwebengine
] ++ lib.optional (!isPy3k) enum34 ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withConnectivity qtconnectivity;
configurePhase = ''
@ -65,7 +67,7 @@ in buildPythonPackage {
'';
postInstall = ''
ln -s ${sip}/${python.sitePackages}/PyQt5/* $out/${python.sitePackages}/PyQt5
ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/
for i in $out/bin/*; do
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
done

View file

@ -1,20 +1,20 @@
{ lib, fetchurl, buildPythonPackage, python, isPyPy }:
{ lib, fetchurl, buildPythonPackage, python, isPyPy, sip-module ? "sip" }:
buildPythonPackage rec {
pname = "sip";
pname = sip-module;
version = "4.19.13";
format = "other";
disabled = isPyPy;
src = fetchurl {
url = "mirror://sourceforge/pyqt/sip/${pname}-${version}/${pname}-${version}.tar.gz";
url = "mirror://sourceforge/pyqt/sip/sip-${version}/sip-${version}.tar.gz";
sha256 = "0pniq03jk1n5bs90yjihw3s3rsmjd8m89y9zbnymzgwrcl2sflz3";
};
configurePhase = ''
${python.executable} ./configure.py \
--sip-module PyQt5.sip \
--sip-module ${sip-module} \
-d $out/lib/${python.libPrefix}/site-packages \
-b $out/bin -e $out/include
'';