2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, mupdf, swig }:
|
2019-09-19 10:14:27 +01:00
|
|
|
buildPythonPackage rec {
|
2020-11-10 09:13:13 +00:00
|
|
|
pname = "pymupdf";
|
2020-10-13 21:47:50 +01:00
|
|
|
version = "1.18.0";
|
2019-09-19 10:14:27 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2020-11-10 09:13:13 +00:00
|
|
|
pname = "PyMuPDF";
|
|
|
|
inherit version;
|
2020-10-13 21:47:50 +01:00
|
|
|
sha256 = "64ce58f92d9edd2631e447175fa13b4024ac3b6dce6e718e0b003c41de6f7952";
|
2019-09-19 10:14:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '/usr/include/mupdf' ${mupdf.dev}/include/mupdf
|
|
|
|
'';
|
|
|
|
nativeBuildInputs = [ swig ];
|
|
|
|
buildInputs = [ mupdf ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-19 10:14:27 +01:00
|
|
|
description = "Python bindings for MuPDF's rendering library.";
|
2020-02-29 16:30:00 +00:00
|
|
|
homepage = "https://github.com/pymupdf/PyMuPDF";
|
2019-09-19 10:14:27 +01:00
|
|
|
maintainers = with maintainers; [ teto ];
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|