diff --git a/pkgs/development/python-modules/pyqt/6.x.nix b/pkgs/development/python-modules/pyqt/6.x.nix index b1bf34abd489..a44e8b89dfa9 100644 --- a/pkgs/development/python-modules/pyqt/6.x.nix +++ b/pkgs/development/python-modules/pyqt/6.x.nix @@ -2,11 +2,10 @@ lib, stdenv, buildPythonPackage, - fetchurl, + fetchPypi, pkg-config, dbus, lndir, - setuptools, dbus-python, sip, pyqt6-sip, @@ -25,15 +24,15 @@ buildPythonPackage rec { pname = "pyqt6"; - version = "6.8.0.dev2410141303"; - format = "pyproject"; + version = "6.8.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.9"; - # This is dangerous, how can we get web archive to archive the URL? - src = fetchurl { - url = "https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${version}.tar.gz"; - hash = "sha256-eHYqj22us07uFkErJD2d0y0wueZxtQTwTFW9cI7yoK4="; + src = fetchPypi { + pname = "PyQt6"; + inherit version; + hash = "sha256-bYYo3kwqBQ8LdEYuTJy5f4Ob9v+rvKkXEXIv+ygVcNk="; }; patches = [ @@ -45,6 +44,16 @@ buildPythonPackage rec { ./pyqt5-confirm-license.patch ]; + build-system = [ + sip + pyqt-builder + ]; + + dependencies = [ + pyqt6-sip + dbus-python + ]; + # be more verbose # and normalize version postPatch = '' @@ -53,11 +62,8 @@ buildPythonPackage rec { verbose = true EOF - # pythonRelaxDeps doesn't work and the wanted versions are not released AFAIK substituteInPlace pyproject.toml \ - --replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"' \ - --replace-fail "sip >=6.9, <7" "sip >=6.8.6, <7" \ - --replace-fail 'PyQt-builder >=1.17, <2' "PyQt-builder >=1.16, <2" + --replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"' ''; enableParallelBuilding = true; @@ -83,7 +89,6 @@ buildPythonPackage rec { [ pkg-config lndir - sip qtbase qtsvg qtdeclarative @@ -104,7 +109,6 @@ buildPythonPackage rec { qtbase qtsvg qtdeclarative - pyqt-builder qtquick3d qtquicktimeline ] @@ -113,13 +117,8 @@ buildPythonPackage rec { ++ lib.optional withLocation qtlocation; propagatedBuildInputs = - [ - dbus-python - pyqt6-sip - setuptools - ] # ld: library not found for -lcups - ++ lib.optionals (withPrintSupport && stdenv.hostPlatform.isDarwin) [ cups ]; + lib.optionals (withPrintSupport && stdenv.hostPlatform.isDarwin) [ cups ]; passthru = { inherit sip pyqt6-sip; diff --git a/pkgs/development/python-modules/pyqt6-charts/default.nix b/pkgs/development/python-modules/pyqt6-charts/default.nix index 0ab27728f7af..b50651cfcc2b 100644 --- a/pkgs/development/python-modules/pyqt6-charts/default.nix +++ b/pkgs/development/python-modules/pyqt6-charts/default.nix @@ -13,15 +13,15 @@ buildPythonPackage rec { pname = "pyqt6-charts"; - version = "6.7.0"; - format = "pyproject"; + version = "6.8.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.9"; src = fetchPypi { pname = "PyQt6_Charts"; inherit version; - hash = "sha256-xPfPNpko978DLk4z9xjTuP5m2hdtSVn+MHNalw2G81w="; + hash = "sha256-+GcFuHQOMEFmfOIRrqogW3UOtrr0yQj04/bcjHINEPE="; }; # fix include path and increase verbosity @@ -46,16 +46,21 @@ buildPythonPackage rec { dontWrapQtApps = true; - nativeBuildInputs = with qt6Packages; [ - qtcharts + build-system = [ sip - qmake pyqt-builder ]; - buildInputs = with qt6Packages; [ qtcharts ]; + dependencies = [ + pyqt6 + ]; - propagatedBuildInputs = [ pyqt6 ]; + nativeBuildInputs = with qt6Packages; [ + qtcharts + qmake + ]; + + buildInputs = with qt6Packages; [ qtcharts ]; dontConfigure = true; @@ -64,11 +69,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "PyQt6.QtCharts" ]; - meta = with lib; { + meta = { description = "Python bindings for Qt6 QtCharts"; homepage = "https://riverbankcomputing.com/"; - license = licenses.gpl3Only; + license = lib.licenses.gpl3Only; inherit (mesa.meta) platforms; - maintainers = with maintainers; [ dandellion ]; + maintainers = with lib.maintainers; [ dandellion ]; }; } diff --git a/pkgs/development/python-modules/pyqt6-webengine/default.nix b/pkgs/development/python-modules/pyqt6-webengine/default.nix index 59a2a1eeab86..4f410a23626f 100644 --- a/pkgs/development/python-modules/pyqt6-webengine/default.nix +++ b/pkgs/development/python-modules/pyqt6-webengine/default.nix @@ -15,17 +15,21 @@ buildPythonPackage rec { pname = "pyqt6-webengine"; - version = "6.7.0"; - format = "pyproject"; + version = "6.8.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.9"; src = fetchPypi { pname = "PyQt6_WebEngine"; inherit version; - hash = "sha256-aO3HrbbZ4nX13pVogeecyg1x+tQ5q+qhDYI7/1rFUAE="; + hash = "sha256-ZARepiK2pBiCwrGPVa6XFLhmCs/walTpEOtygiwvP/I="; }; + patches = [ + ./qvariant.patch + ]; + # fix include path and increase verbosity postPatch = '' sed -i \ @@ -53,18 +57,23 @@ buildPythonPackage rec { dontWrapQtApps = true; - nativeBuildInputs = with qt6Packages; [ - pkg-config - lndir + build-system = [ sip - qtwebengine - qmake pyqt-builder ]; - buildInputs = with qt6Packages; [ qtwebengine ]; + dependencies = [ + pyqt6 + ]; - propagatedBuildInputs = [ pyqt6 ]; + nativeBuildInputs = with qt6Packages; [ + pkg-config + lndir + qtwebengine + qmake + ]; + + buildInputs = with qt6Packages; [ qtwebengine ]; passthru = { inherit sip; @@ -80,12 +89,12 @@ buildPythonPackage rec { "PyQt6.QtWebEngineWidgets" ]; - meta = with lib; { + meta = { description = "Python bindings for Qt6 WebEngine"; homepage = "https://riverbankcomputing.com/"; - license = licenses.gpl3Only; + license = lib.licenses.gpl3Only; inherit (mesa.meta) platforms; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ LunNova nrdxp ]; diff --git a/pkgs/development/python-modules/pyqt6-webengine/qvariant.patch b/pkgs/development/python-modules/pyqt6-webengine/qvariant.patch new file mode 100644 index 000000000000..b964a1e1cf2f --- /dev/null +++ b/pkgs/development/python-modules/pyqt6-webengine/qvariant.patch @@ -0,0 +1,12 @@ +diff --git a/sip/QtWebEngineCore/qwebengineframe.sip b/sip/QtWebEngineCore/qwebengineframe.sip +index d5420e6..5a29f29 100644 +--- a/sip/QtWebEngineCore/qwebengineframe.sip ++++ b/sip/QtWebEngineCore/qwebengineframe.sip +@@ -26,6 +26,7 @@ class QWebEngineFrame /NoDefaultCtors/ + { + %TypeHeaderCode + #include ++#include + %End + + public: diff --git a/pkgs/development/python-modules/sip/default.nix b/pkgs/development/python-modules/sip/default.nix index c0a828ab39c8..bf83c5c8c142 100644 --- a/pkgs/development/python-modules/sip/default.nix +++ b/pkgs/development/python-modules/sip/default.nix @@ -16,12 +16,12 @@ buildPythonPackage rec { pname = "sip"; - version = "6.9.0"; + version = "6.9.1"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-CT/Q4V2Zri+Kg91/fbqj/yUMWCp3644IRc2aytsfCTQ="; + hash = "sha256-eQS+UZDXh5lSVjt4o68OWPon2VJa9/U/k+rHqDtDPns="; }; build-system = [