2021-01-19 06:50:56 +00:00
|
|
|
{ buildPythonPackage, fetchPypi, lib, stdenv, sip, qtbase, pyqt5, poppler, pkg-config, fetchpatch
|
2018-07-21 01:44:44 +01:00
|
|
|
, substituteAll
|
2018-03-31 16:02:32 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-poppler-qt5";
|
|
|
|
version = "0.24.2";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./poppler-include-dir.patch;
|
|
|
|
poppler_include_dir = "${poppler.dev}/include/poppler";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/wbsoft/python-poppler-qt5/commit/faf4d1308f89560b0d849671226e3080dfc72e79.patch";
|
|
|
|
sha256 = "18krhh6wzsnpxzlzv02nginb1vralla8ai24zqk10nc4mj6fkj86";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
setupPyBuildFlags = [
|
|
|
|
"--pyqt-sip-dir ${pyqt5}/share/sip/PyQt5"
|
|
|
|
"--qt-include-dir ${qtbase.dev}/include"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ qtbase.dev poppler ];
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-03-31 16:02:32 +01:00
|
|
|
propagatedBuildInputs = [ sip pyqt5.dev ];
|
|
|
|
|
|
|
|
# no tests, just bindings for `poppler_qt5`
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/wbsoft/python-poppler-qt5";
|
2018-03-31 16:02:32 +01:00
|
|
|
license = licenses.gpl2;
|
2019-12-26 14:13:48 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-03-31 16:02:32 +01:00
|
|
|
};
|
|
|
|
}
|