2019-09-19 10:14:27 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, mupdf, swig }:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyMuPDF";
|
2020-05-09 10:52:26 +01:00
|
|
|
version = "1.16.18";
|
2019-09-19 10:14:27 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 10:52:26 +01:00
|
|
|
sha256 = "0gpcmmcjgwc6x4rn6nm3akiijdkpa9nahsw2x8a0i7z7kzj4firk";
|
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;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|