ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / poppler-qt5 / default.nix
blobc2bbeab96daa488e1c37121ec1980108b288db02
1 { lib
2 , buildPythonPackage
3 , isPy3k
4 , fetchPypi
5 , sip
6 , qtbase
7 , qmake
8 , pyqt5
9 , pyqt-builder
10 , poppler
11 , pkg-config
12 , setuptools
13 , fetchpatch
16 buildPythonPackage rec {
17   pname = "python-poppler-qt5";
18   version = "21.1.0";
20   disabled = !isPy3k;
22   src = fetchPypi {
23     inherit pname version;
24     sha256 = "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd";
25   };
27   patches = [
28     # Fix for https://github.com/frescobaldi/python-poppler-qt5/issues/43 (from PR #45)
29     (fetchpatch {
30       url = "https://github.com/frescobaldi/python-poppler-qt5/commit/40e71ad88173d02648bceb2438bc0567e60dacd5.patch";
31       sha256 = "0c93d0k7b1n2s2njl8g92x6vw3z96da1fczah9qx07x08iw8dzi5";
32     })
33   ];
35   buildInputs = [ qtbase.dev poppler pyqt-builder ];
36   nativeBuildInputs = [ pkg-config qmake sip setuptools ];
37   propagatedBuildInputs = [ pyqt5.dev ];
39   format = "pyproject";
40   dontConfigure = true;
42   postPatch = ''
43     cat <<EOF >> pyproject.toml
44     [tool.sip.bindings.Poppler-Qt5]
45     include-dirs = ["${poppler.dev}/include/poppler"]
46     EOF
47   '';
49   # no tests, just bindings for `poppler_qt5`
50   doCheck = false;
51   pythonImportsCheck = [ "popplerqt5" ];
53   dontWrapQtApps = true;
55   meta = with lib; {
56     homepage = "https://github.com/frescobaldi/python-poppler-qt5";
57     license = licenses.lgpl21Plus;
58     maintainers = with maintainers; [ ];
59   };