Skip to content

Commit

Permalink
qgis: fix sip and pyqt5-sip compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
imincik committed Dec 18, 2023
1 parent dff64d4 commit 86a1ba7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
31 changes: 31 additions & 0 deletions pkgs/applications/gis/qgis/pyqt5-sip.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
4 changes: 3 additions & 1 deletion pkgs/applications/gis/qgis/unwrapped-ltr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
};
};
};
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
};
};
};
Expand Down

0 comments on commit 86a1ba7

Please sign in to comment.