summary refs log tree commit diff
path: root/pkgs/development/python-modules/tesserocr/default.nix
blob: 2d4f9d10a8cc0a82874b5e1cd18cae93f40da06d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  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;
  };
}