mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
afd6b04f47
python bindings for mupdf. Provides the fitz module for https://github.com/dsanson/termpdf.py that I am trying to package.
28 lines
716 B
Nix
28 lines
716 B
Nix
{ stdenv, buildPythonPackage, fetchPypi, mupdf, swig }:
|
|
buildPythonPackage rec {
|
|
pname = "PyMuPDF";
|
|
version = "1.16.2";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1bidybzkjsc0kdd18xnhz97p70br8xh8whzwydp3a5m411cm00mg";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|