d9e13ed064
GitOrigin-RevId: a930f7da84786807bb105df40e76b541604c3e72
79 lines
1.4 KiB
Nix
79 lines
1.4 KiB
Nix
{ lib
|
|
, attrs
|
|
, buildPythonPackage
|
|
, defusedxml
|
|
, fetchPypi
|
|
, hypothesis
|
|
, isPy3k
|
|
, jbig2dec
|
|
, lxml
|
|
, mupdf
|
|
, pillow
|
|
, psutil
|
|
, pybind11
|
|
, pytest-xdist
|
|
, pytestCheckHook
|
|
, python-dateutil
|
|
, python-xmp-toolkit
|
|
, qpdf
|
|
, setuptools
|
|
, setuptools-scm
|
|
, setuptools-scm-git-archive
|
|
, substituteAll
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pikepdf";
|
|
version = "3.0.0";
|
|
disabled = ! isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-PBeTfiMLIq+pdeaRMOid8pEd0eLHu+IAE4aEFU5CiEM=";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./paths.patch;
|
|
jbig2dec = "${lib.getBin jbig2dec}/bin/jbig2dec";
|
|
mudraw = "${lib.getBin mupdf}/bin/mudraw";
|
|
})
|
|
];
|
|
|
|
buildInputs = [
|
|
pybind11
|
|
qpdf
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm-git-archive
|
|
setuptools-scm
|
|
];
|
|
|
|
checkInputs = [
|
|
attrs
|
|
hypothesis
|
|
pytest-xdist
|
|
psutil
|
|
pytestCheckHook
|
|
python-dateutil
|
|
python-xmp-toolkit
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
defusedxml
|
|
lxml
|
|
pillow
|
|
setuptools
|
|
];
|
|
|
|
pythonImportsCheck = [ "pikepdf" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/pikepdf/pikepdf";
|
|
description = "Read and write PDFs with Python, powered by qpdf";
|
|
license = licenses.mpl20;
|
|
maintainers = with maintainers; [ kiwi dotlambda ];
|
|
changelog = "https://github.com/pikepdf/pikepdf/blob/${version}/docs/release_notes.rst";
|
|
};
|
|
}
|