pythonPackages.sip: make sip-module name overridable

The author of sip wants it to be a private dependency of other packages by
making it importable under different names.
This commit is contained in:
Orivej Desh 2018-12-27 03:01:15 +00:00
parent ae002fe44e
commit bf1a563af0

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
'';