Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / poppler-qt5 / default.nix
blob06c0e7a6e6ee9e61c9a83d52f86e427914c455b4
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
15 buildPythonPackage rec {
16   pname = "python-poppler-qt5";
17   version = "21.3.0";
19   disabled = !isPy3k;
21   src = fetchPypi {
22     inherit pname version;
23     sha256 = "sha256-tHfohB8OoOCf2rby8wXPON+XfZ4ULlaTo3RgXXXdb+A=";
24   };
27   buildInputs = [ qtbase.dev poppler pyqt-builder ];
28   nativeBuildInputs = [ pkg-config qmake sip setuptools ];
29   propagatedBuildInputs = [ pyqt5.dev ];
31   format = "pyproject";
32   dontConfigure = true;
34   postPatch = ''
35     cat <<EOF >> pyproject.toml
36     [tool.sip.bindings.Poppler-Qt5]
37     include-dirs = ["${poppler.dev}/include/poppler"]
38     EOF
39   '';
41   # no tests, just bindings for `poppler_qt5`
42   doCheck = false;
43   pythonImportsCheck = [ "popplerqt5" ];
45   dontWrapQtApps = true;
47   meta = with lib; {
48     homepage = "https://github.com/frescobaldi/python-poppler-qt5";
49     license = licenses.lgpl21Plus;
50     maintainers = with maintainers; [ ];
51   };