2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
2021-05-03 20:48:10 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
2021-05-20 23:08:51 +00:00
|
|
|
, sip
|
2021-05-03 20:48:10 +00:00
|
|
|
, qtbase
|
|
|
|
, qmake
|
|
|
|
, pyqt5
|
|
|
|
, pyqt-builder
|
|
|
|
, poppler
|
|
|
|
, pkg-config
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-poppler-qt5";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "21.3.0";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-tHfohB8OoOCf2rby8wXPON+XfZ4ULlaTo3RgXXXdb+A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
buildInputs = [ qtbase.dev poppler pyqt-builder ];
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [ pkg-config qmake sip setuptools ];
|
2021-05-03 20:48:10 +00:00
|
|
|
propagatedBuildInputs = [ pyqt5.dev ];
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cat <<EOF >> pyproject.toml
|
|
|
|
[tool.sip.bindings.Poppler-Qt5]
|
|
|
|
include-dirs = ["${poppler.dev}/include/poppler"]
|
|
|
|
EOF
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# no tests, just bindings for `poppler_qt5`
|
|
|
|
doCheck = false;
|
2021-05-03 20:48:10 +00:00
|
|
|
pythonImportsCheck = [ "popplerqt5" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-05-03 20:48:10 +00:00
|
|
|
homepage = "https://github.com/frescobaldi/python-poppler-qt5";
|
|
|
|
license = licenses.lgpl21Plus;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|