nixpkgs/pkgs/development/python-modules/pymupdf/default.nix
2020-08-29 10:23:39 -07:00

28 lines
730 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, mupdf, swig }:
buildPythonPackage rec {
pname = "PyMuPDF";
version = "1.17.6";
src = fetchPypi {
inherit pname version;
sha256 = "5eef4ff61698016a296932858625a5a0039b923ba692043e2c98ca02966f1da2";
};
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;
};
}