|
|
|
@ -74,6 +74,12 @@ lib.composeManyExtensions [ |
|
|
|
|
inherit (pkgs) buildPackages; |
|
|
|
|
pyBuildPackages = self.python.pythonForBuild.pkgs; |
|
|
|
|
|
|
|
|
|
selectQt5 = version: |
|
|
|
|
let |
|
|
|
|
selector = builtins.concatStringsSep "" (lib.take 2 (builtins.splitVersion version)); |
|
|
|
|
in |
|
|
|
|
pkgs."qt${selector}" or pkgs.qt5; |
|
|
|
|
|
|
|
|
|
in |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
@ -287,6 +293,7 @@ lib.composeManyExtensions [ |
|
|
|
|
"36.0.0" = "sha256-Y6TuW7AryVgSvZ6G8WNoDIvi+0tvx8ZlEYF5qB0jfNk="; |
|
|
|
|
"36.0.1" = "sha256-kozYXkqt1Wpqyo9GYCwN08J+zV92ZWFJY/f+rulxmeQ="; |
|
|
|
|
"36.0.2" = "1a0ni1a3dbv2dvh6gx2i54z8v5j9m6asqg97kkv7gqb1ivihsbp8"; |
|
|
|
|
"37.0.2" = "sha256-qvrxvneoBXjP96AnUPyrtfmCnZo+IriHR5HbtWQ5Gk8="; |
|
|
|
|
}.${version} or null; |
|
|
|
|
sha256 = getCargoHash super.cryptography.version; |
|
|
|
|
scrypto = |
|
|
|
@ -517,6 +524,14 @@ lib.composeManyExtensions [ |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
file-magic = super.file-magic.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
postPatch = '' |
|
|
|
|
substituteInPlace magic.py --replace "find_library('magic')" "'${pkgs.file}/lib/libmagic${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}'" |
|
|
|
|
''; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
fiona = super.fiona.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.gdal_2 ]; |
|
|
|
@ -735,6 +750,14 @@ lib.composeManyExtensions [ |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
jinja2-ansible-filters = super.jinja2-ansible-filters.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
preBuild = (old.preBuild or "") + '' |
|
|
|
|
echo "${old.version}" > VERSION |
|
|
|
|
''; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
jira = super.jira.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
inherit (pkgs.python3Packages.jira) patches; |
|
|
|
@ -1056,6 +1079,18 @@ lib.composeManyExtensions [ |
|
|
|
|
|
|
|
|
|
mypy = super.mypy.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ |
|
|
|
|
self.types-typed-ast |
|
|
|
|
]; |
|
|
|
|
# Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled |
|
|
|
|
# version is also the default in the wheels on Pypi that include binaries. |
|
|
|
|
# is64bit: unfortunately the build would exhaust all possible memory on i686-linux. |
|
|
|
|
MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit; |
|
|
|
|
|
|
|
|
|
# when testing reduce optimisation level to drastically reduce build time |
|
|
|
|
# (default is 3) |
|
|
|
|
# MYPYC_OPT_LEVEL = 1; |
|
|
|
|
} // lib.optionalAttrs (old.format != "wheel") { |
|
|
|
|
# FIXME: Remove patch after upstream has decided the proper solution. |
|
|
|
|
# https://github.com/python/mypy/pull/11143 |
|
|
|
|
patches = (old.patches or [ ]) ++ lib.optionals ((lib.strings.versionAtLeast old.version "0.900") && lib.strings.versionOlder old.version "0.940") [ |
|
|
|
@ -1069,17 +1104,6 @@ lib.composeManyExtensions [ |
|
|
|
|
sha256 = "sha256-waIZ+m3tfvYE4HJ8kL6rN/C4fMjvLEe9UoPbt9mHWIM="; |
|
|
|
|
}) |
|
|
|
|
]; |
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ |
|
|
|
|
self.types-typed-ast |
|
|
|
|
]; |
|
|
|
|
# Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled |
|
|
|
|
# version is also the default in the wheels on Pypi that include binaries. |
|
|
|
|
# is64bit: unfortunately the build would exhaust all possible memory on i686-linux. |
|
|
|
|
MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit; |
|
|
|
|
|
|
|
|
|
# when testing reduce optimisation level to drastically reduce build time |
|
|
|
|
# (default is 3) |
|
|
|
|
# MYPYC_OPT_LEVEL = 1; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
@ -1566,106 +1590,35 @@ lib.composeManyExtensions [ |
|
|
|
|
|
|
|
|
|
pyqt5 = |
|
|
|
|
let |
|
|
|
|
drv = super.pyqt5; |
|
|
|
|
withConnectivity = drv.passthru.args.withConnectivity or false; |
|
|
|
|
withMultimedia = drv.passthru.args.withMultimedia or false; |
|
|
|
|
withWebKit = drv.passthru.args.withWebKit or false; |
|
|
|
|
withWebSockets = drv.passthru.args.withWebSockets or false; |
|
|
|
|
qt5 = selectQt5 super.pyqt5.version; |
|
|
|
|
in |
|
|
|
|
super.pyqt5.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
format = "other"; |
|
|
|
|
|
|
|
|
|
dontConfigure = true; |
|
|
|
|
dontWrapQtApps = true; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ |
|
|
|
|
pkg-config |
|
|
|
|
pkgs.qt5.qmake |
|
|
|
|
pkgs.xorg.lndir |
|
|
|
|
pkgs.qt5.qtbase |
|
|
|
|
pkgs.qt5.qtsvg |
|
|
|
|
pkgs.qt5.qtdeclarative |
|
|
|
|
pkgs.qt5.qtwebchannel |
|
|
|
|
pkgs.qt5.qt3d |
|
|
|
|
# self.pyqt5-sip |
|
|
|
|
self.sip |
|
|
|
|
] |
|
|
|
|
++ lib.optional withConnectivity pkgs.qt5.qtconnectivity |
|
|
|
|
++ lib.optional withMultimedia pkgs.qt5.qtmultimedia |
|
|
|
|
++ lib.optional withWebKit pkgs.qt5.qtwebkit |
|
|
|
|
++ lib.optional withWebSockets pkgs.qt5.qtwebsockets |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ |
|
|
|
|
pkgs.dbus |
|
|
|
|
pkgs.qt5.qtbase |
|
|
|
|
pkgs.qt5.qtsvg |
|
|
|
|
pkgs.qt5.qtdeclarative |
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ |
|
|
|
|
self.pyqt-builder |
|
|
|
|
self.sip |
|
|
|
|
] |
|
|
|
|
++ lib.optional withConnectivity pkgs.qt5.qtconnectivity |
|
|
|
|
++ lib.optional withWebKit pkgs.qt5.qtwebkit |
|
|
|
|
++ lib.optional withWebSockets pkgs.qt5.qtwebsockets |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
# Fix dbus mainloop |
|
|
|
|
patches = pkgs.python3.pkgs.pyqt5.patches or [ ]; |
|
|
|
|
|
|
|
|
|
configurePhase = '' |
|
|
|
|
runHook preConfigure |
|
|
|
|
|
|
|
|
|
export PYTHONPATH=$PYTHONPATH:$out/${self.python.sitePackages} |
|
|
|
|
|
|
|
|
|
mkdir -p $out/${self.python.sitePackages}/dbus/mainloop |
|
|
|
|
${self.python.executable} configure.py -w \ |
|
|
|
|
--confirm-license \ |
|
|
|
|
--no-qml-plugin \ |
|
|
|
|
--bindir=$out/bin \ |
|
|
|
|
--destdir=$out/${self.python.sitePackages} \ |
|
|
|
|
--stubsdir=$out/${self.python.sitePackages}/PyQt5 \ |
|
|
|
|
--sipdir=$out/share/sip/PyQt5 \ |
|
|
|
|
--designer-plugindir=$out/plugins/designer |
|
|
|
|
|
|
|
|
|
runHook postConfigure |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
postInstall = '' |
|
|
|
|
ln -s ${self.pyqt5-sip}/${self.python.sitePackages}/PyQt5/sip.* $out/${self.python.sitePackages}/PyQt5/ |
|
|
|
|
for i in $out/bin/*; do |
|
|
|
|
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH" |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
# Let's make it a namespace package |
|
|
|
|
cat << EOF > $out/${self.python.sitePackages}/PyQt5/__init__.py |
|
|
|
|
from pkgutil import extend_path |
|
|
|
|
__path__ = extend_path(__path__, __name__) |
|
|
|
|
EOF |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
installCheckPhase = |
|
|
|
|
let |
|
|
|
|
modules = [ |
|
|
|
|
"PyQt5" |
|
|
|
|
"PyQt5.QtCore" |
|
|
|
|
"PyQt5.QtQml" |
|
|
|
|
"PyQt5.QtWidgets" |
|
|
|
|
"PyQt5.QtGui" |
|
|
|
|
] |
|
|
|
|
++ lib.optional withWebSockets "PyQt5.QtWebSockets" |
|
|
|
|
++ lib.optional withWebKit "PyQt5.QtWebKit" |
|
|
|
|
++ lib.optional withMultimedia "PyQt5.QtMultimedia" |
|
|
|
|
++ lib.optional withConnectivity "PyQt5.QtConnectivity" |
|
|
|
|
; |
|
|
|
|
imports = lib.concatMapStrings (module: "import ${module};") modules; |
|
|
|
|
in |
|
|
|
|
'' |
|
|
|
|
echo "Checking whether modules can be imported..." |
|
|
|
|
${self.python.interpreter} -c "${imports}" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
doCheck = true; |
|
|
|
|
qt5.full |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
enableParallelBuilding = true; |
|
|
|
|
pyqt5-qt5 = |
|
|
|
|
let |
|
|
|
|
qt5 = selectQt5 super.pyqt5-qt5.version; |
|
|
|
|
in |
|
|
|
|
super.pyqt5-qt5.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
dontWrapQtApps = true; |
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [ |
|
|
|
|
qt5.full |
|
|
|
|
qt5.qtgamepad # As of 2022-05-13 not a port of qt5.full |
|
|
|
|
pkgs.gtk3 |
|
|
|
|
pkgs.speechd |
|
|
|
|
pkgs.postgresql |
|
|
|
|
pkgs.unixODBC |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
@ -1681,7 +1634,10 @@ lib.composeManyExtensions [ |
|
|
|
|
old: { |
|
|
|
|
# Fixes https://github.com/pytest-dev/pytest/issues/7891 |
|
|
|
|
postPatch = old.postPatch or "" + '' |
|
|
|
|
sed -i '/\[metadata\]/aversion = ${old.version}' setup.cfg |
|
|
|
|
# sometimes setup.cfg doesn't exist |
|
|
|
|
if [ -f setup.cfg ]; then |
|
|
|
|
sed -i '/\[metadata\]/aversion = ${old.version}' setup.cfg |
|
|
|
|
fi |
|
|
|
|
''; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
@ -1758,6 +1714,10 @@ lib.composeManyExtensions [ |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
python-twitter = super.python-twitter.overridePythonAttrs (old: { |
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
pythran = super.pythran.overridePythonAttrs (old: { |
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; |
|
|
|
|
}); |
|
|
|
@ -1925,7 +1885,14 @@ lib.composeManyExtensions [ |
|
|
|
|
shapely = super.shapely.overridePythonAttrs ( |
|
|
|
|
old: { |
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.geos ]; |
|
|
|
|
inherit (pkgs.python3.pkgs.shapely) patches GEOS_LIBRARY_PATH; |
|
|
|
|
inherit (pkgs.python3.pkgs.shapely) GEOS_LIBRARY_PATH; |
|
|
|
|
|
|
|
|
|
GEOS_LIBC = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6"; |
|
|
|
|
|
|
|
|
|
# Fix library paths |
|
|
|
|
postPatch = old.postPatch or "" + '' |
|
|
|
|
${self.python.pythonForBuild.interpreter} ${./shapely-rewrite.py} shapely/geos.py |
|
|
|
|
''; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|