depot/third_party/nixpkgs/pkgs/development/python-modules/tesserocr/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 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.1";
src = fetchPypi {
inherit pname version;
sha256 = "0cc7d4r11z26rhcwpmcc42fi9kr3f20nq5pk84jrczr18i0g99mh";
};
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;
};
}