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