diff --git a/overrides/default.nix b/overrides/default.nix index d413cc5..c301e67 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -2448,64 +2448,75 @@ lib.composeManyExtensions [ } ); - pyqt6 = super.pyqt6.overridePythonAttrs (old: + pyqt6 = let - confirm-license = pkgs.writeText "confirm-license.patch" '' - diff --git a/project.py b/project.py - --- a/project.py - +++ b/project.py - @@ -163,8 +163,7 @@ + # The build from source fails unless the pyqt6 version agrees + # with the version of qt6 from nixpkgs. Thus, we prefer using + # the wheel here. + pyqt6-wheel = super.pyqt6.override { preferWheel = true; }; + pyqt6 = pyqt6-wheel.overridePythonAttrs (old: + let + confirm-license = pkgs.writeText "confirm-license.patch" '' + diff --git a/project.py b/project.py + --- a/project.py + +++ b/project.py + @@ -163,8 +163,7 @@ - # Automatically confirm the license if there might not be a command - # line option to do so. - - if tool == 'pep517': - - self.confirm_license = True - + self.confirm_license = True + # Automatically confirm the license if there might not be a command + # line option to do so. + - if tool == 'pep517': + - self.confirm_license = True + + self.confirm_license = True - self._check_license() + self._check_license() - ''; + ''; + isWheel = old.src.isWheel or false; + in + { + propagatedBuildInputs = old.propagatedBuildInputs ++ [ + self.dbus-python + ]; + nativeBuildInputs = old.nativeBuildInputs ++ [ + pkgs.pkg-config + self.pyqt6-sip + self.sip + self.pyqt-builder + pkgs.xorg.lndir + pkgs.qt6.qmake + ] ++ lib.optionals isWheel [ + pkgs.qt6.full # building from source doesn't properly pick up libraries from pyqt6-qt6 + ]; + patches = lib.optionals (!isWheel) [ + confirm-license + ]; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; + # be more verbose + postPatch = '' + cat >> pyproject.toml <> pyproject.toml <"] [tool.poetry.dependencies] python = ">=3.10,<3.13" -pyqt6 = "6.5.3" -pyqt6-qt6 = "6.5.3" +pyqt6 = "6.5.2" +pyqt6-qt6 = "6.5.2" [tool.poetry.dev-dependencies]