1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/tesserocr/default.nix

35 lines
787 B
Nix

{
buildPythonPackage,
fetchPypi,
lib,
# build dependencies
cython,
leptonica,
pkg-config,
tesseract,
# extra python packages
pillow
}:
buildPythonPackage rec {
pname = "tesserocr";
version = "2.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "0nj33mwvppacy6p5mqk9a4x26hx9ailshgad84ks60wyms6rgjiv";
};
nativeBuildInputs = [ cython pkg-config ];
buildInputs = [ leptonica tesseract ];
propagatedBuildInputs = [ pillow ];
meta = with lib; {
description = "A simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR)";
homepage = "https://github.com/sirfz/tesserocr";
license = licenses.mit;
maintainers = with maintainers; [ mtrsk ];
platforms = platforms.linux;
};
}