From 1824a128a150d743f1c6614ae849ad64894057a1 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 14 Aug 2022 10:29:56 -0700 Subject: [PATCH] PyQt6: init at 6.4.0 --- pkgs/development/python-modules/pyqt/6.x.nix | 138 ++++++++++++++++++ .../python-modules/pyqt/pyqt6-sip.nix | 28 ++++ pkgs/top-level/python-packages.nix | 4 + 3 files changed, 170 insertions(+) create mode 100644 pkgs/development/python-modules/pyqt/6.x.nix create mode 100644 pkgs/development/python-modules/pyqt/pyqt6-sip.nix diff --git a/pkgs/development/python-modules/pyqt/6.x.nix b/pkgs/development/python-modules/pyqt/6.x.nix new file mode 100644 index 000000000000..c2ef82a158c6 --- /dev/null +++ b/pkgs/development/python-modules/pyqt/6.x.nix @@ -0,0 +1,138 @@ +{ lib +, buildPythonPackage +, isPy27 +, fetchPypi +, pkg-config +, dbus +, lndir +, setuptools +, dbus-python +, sip +, pyqt6-sip +, pyqt-builder +, qt6Packages +, pythonOlder +, withMultimedia ? true +, withWebSockets ? true +# FIXME: Once QtLocation is available for Qt6 enable this +# https://bugreports.qt.io/browse/QTBUG-96795 +#, withLocation ? true +# Not currently part of PyQt6 +#, withConnectivity ? true +}: + +buildPythonPackage rec { + pname = "PyQt6"; + version = "6.4.0"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-kTkkab4fSRkF+p54+k5AWaiathbd8uz9UlvB1lwmu5M="; + }; + + patches = [ + # Fix some wrong assumptions by ./project.py + # TODO: figure out how to send this upstream + # FIXME: make a version for PyQt6? + # ./pyqt5-fix-dbus-mainloop-support.patch + # confirm license when installing via pyqt6_sip + ./pyqt5-confirm-license.patch + ]; + + # be more verbose + postPatch = '' + cat >> pyproject.toml < error: could not create 'PyQt5/sip.cpython-38-x86_64-linux-gnu.so': No such file or directory + doCheck = false; + pythonImportsCheck = [ "PyQt6.sip" ]; + + meta = with lib; { + description = "Python bindings for Qt5"; + homepage = "https://www.riverbankcomputing.com/software/sip/"; + license = licenses.gpl3Only; + platforms = platforms.mesaPlatforms; + maintainers = with maintainers; [ LunNova ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98e7c6c5f273..d6275e47cf21 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8367,6 +8367,10 @@ in { withWebKit = true; }; + pyqt6 = callPackage ../development/python-modules/pyqt/6.x.nix { }; + + pyqt6-sip = callPackage ../development/python-modules/pyqt/pyqt6-sip.nix { }; + pyqtgraph = callPackage ../development/python-modules/pyqtgraph { }; pyqtwebengine = pkgs.libsForQt5.callPackage ../development/python-modules/pyqtwebengine {