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