nixpkgs/pkgs/development/python-modules/pymupdf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
889 B
Nix
Raw Normal View History

2021-08-09 01:45:06 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, mupdf
, swig
, freetype
, harfbuzz
, openjpeg
, jbig2dec
, libjpeg_turbo
, gumbo
}:
buildPythonPackage rec {
2020-11-10 09:13:13 +00:00
pname = "pymupdf";
version = "1.19.6";
src = fetchPypi {
2020-11-10 09:13:13 +00:00
pname = "PyMuPDF";
inherit version;
sha256 = "sha256-7z0T4n8Vhdd29qJZfxE6q9KNNrZIuYOnKFCyHFOZqwg=";
};
2021-08-09 01:45:06 +00:00
postPatch = ''
substituteInPlace setup.py \
--replace '/usr/include/mupdf' ${mupdf.dev}/include/mupdf
2021-08-09 01:45:06 +00:00
'';
nativeBuildInputs = [ swig ];
2021-08-09 01:45:06 +00:00
buildInputs = [ mupdf freetype harfbuzz openjpeg jbig2dec libjpeg_turbo gumbo ];
doCheck = false;
2021-08-09 01:45:06 +00:00
pythonImportsCheck = [ "fitz" ];
meta = with lib; {
description = "Python bindings for MuPDF's rendering library.";
homepage = "https://github.com/pymupdf/PyMuPDF";
maintainers = with maintainers; [ teto ];
2021-08-09 01:45:06 +00:00
license = licenses.agpl3Only;
platforms = platforms.linux;
};
}