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
|
2021-05-03 20:48:10 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-poppler-qt5";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "21.1.0";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-05-03 20:48:10 +00:00
|
|
|
# Fix for https://github.com/frescobaldi/python-poppler-qt5/issues/43 (from PR #45)
|
2020-04-24 23:36:52 +00:00
|
|
|
(fetchpatch {
|
2021-05-03 20:48:10 +00:00
|
|
|
url = "https://github.com/frescobaldi/python-poppler-qt5/commit/40e71ad88173d02648bceb2438bc0567e60dacd5.patch";
|
|
|
|
sha256 = "0c93d0k7b1n2s2njl8g92x6vw3z96da1fczah9qx07x08iw8dzi5";
|
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
|
|
|
};
|
|
|
|
}
|