Skip to content

Commit

Permalink
pkgs(qgis,qgis-ltr): fix sip and pyqt5_sip compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
imincik committed Dec 15, 2023
1 parent df70e00 commit bbb3b5b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@
};

pyqt5 = pkgs.${python}.pkgs.pyqt5.override {
# FIX sip and pyqt5_sip compatibility. See: https://github.com/NixOS/nixpkgs/issues/273561
# Remove this fix in NixOS 24.05.
pyqt5_sip = pkgs.${python}.pkgs.callPackage ./pkgs/qgis/pyqt5-sip.nix { };
withLocation = true;
};

Expand Down
31 changes: 31 additions & 0 deletions pkgs/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.13.0";

src = fetchPypi {
pname = "PyQt5_sip";
inherit version;
hash = "sha256-fzIdr4S5ydvKYbgOHvN72v/A6TMS7a4s19oluVOXHZE=";
};

# 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 ];
};
}

0 comments on commit bbb3b5b

Please sign in to comment.