nixpkgs/pkgs/development/python-modules/pymupdf/default.nix
2020-08-16 19:31:12 +02:00

28 lines
730 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, mupdf, swig }:
buildPythonPackage rec {
pname = "PyMuPDF";
version = "1.17.5";
src = fetchPypi {
inherit pname version;
sha256 = "ddec02c4dd1c2e0ead4d61cd97b52e725d643602f1f7832b5016190f5c653add";
};
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.";
homepage = "https://github.com/pymupdf/PyMuPDF";
maintainers = with maintainers; [ teto ];
license = licenses.agpl3;
platforms = platforms.linux;
};
}