diff options
| author | Ivan Mincik <ivan.mincik@gmail.com> | 2023-12-15 10:27:52 +0100 |
|---|---|---|
| committer | Ivan Mincik <ivan.mincik@gmail.com> | 2023-12-18 18:27:50 +0100 |
| commit | 86a1ba7ba1c5bb2c4c3efcf02debfc00424cb652 (patch) | |
| tree | 9b4b031c592d7da7b1da9e10d8cbd383e3176fa7 | |
| parent | Merge pull request #274249 from NixOS/backport-272925-to-release-23.11 (diff) | |
| download | nixpkgs-origin/qgis-fix-sip-pyqt5-sip-compatibility.tar.gz | |
qgis: fix sip and pyqt5-sip compatibilityorigin/qgis-fix-sip-pyqt5-sip-compatibility
| -rw-r--r-- | pkgs/applications/gis/qgis/pyqt5-sip.nix | 31 | ||||
| -rw-r--r-- | pkgs/applications/gis/qgis/unwrapped-ltr.nix | 4 | ||||
| -rw-r--r-- | pkgs/applications/gis/qgis/unwrapped.nix | 3 |
3 files changed, 37 insertions, 1 deletions
diff --git a/pkgs/applications/gis/qgis/pyqt5-sip.nix b/pkgs/applications/gis/qgis/pyqt5-sip.nix new file mode 100644 index 000000000000..899ef4954445 --- /dev/null +++ b/pkgs/applications/gis/qgis/pyqt5-sip.nix @@ -0,0 +1,31 @@ +# FIX sip and pyqt5_sip compatibility. See: https://github.com/NixOS/nixpkgs/issues/273561 +# Remove this fix in NixOS 24.05. + +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "pyqt5-sip"; + version = "12.12.1"; + + src = fetchPypi { + pname = "PyQt5_sip"; + inherit version; + hash = "sha256-j9xuAUir0S2Xeh04KOe3mq6VjoPGy1ra5hSRbYiKaxA="; + }; + + # There is no test code and the check phase fails with: + # > error: could not create 'PyQt5/sip.cpython-38-x86_64-linux-gnu.so': No such file or directory + doCheck = false; + pythonImportsCheck = ["PyQt5.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; [ sander ]; + }; +} diff --git a/pkgs/applications/gis/qgis/unwrapped-ltr.nix b/pkgs/applications/gis/qgis/unwrapped-ltr.nix index ba587bb76365..a7341be2bffd 100644 --- a/pkgs/applications/gis/qgis/unwrapped-ltr.nix +++ b/pkgs/applications/gis/qgis/unwrapped-ltr.nix @@ -46,11 +46,13 @@ }: let - py = python3.override { packageOverrides = self: super: { pyqt5 = super.pyqt5.override { withLocation = true; + # FIX sip and pyqt5_sip compatibility. See: https://github.com/NixOS/nixpkgs/issues/273561 + # Remove this fix in NixOS 24.05. + pyqt5_sip = python3.pkgs.callPackage ./pyqt5-sip.nix { }; }; }; }; diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index 8bc888bca918..33b0aa7e20a8 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -52,6 +52,9 @@ let packageOverrides = self: super: { pyqt5 = super.pyqt5.override { withLocation = true; + # FIX sip and pyqt5_sip compatibility. See: https://github.com/NixOS/nixpkgs/issues/273561 + # Remove this fix in NixOS 24.05. + pyqt5_sip = python3.pkgs.callPackage ./pyqt5-sip.nix { }; }; }; }; |
