Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 buildPythonPackage,
3 fetchPypi,
4 lib,
5 # build dependencies
6 cython,
7 leptonica,
8 pkg-config,
9 tesseract,
10 # extra python packages
11 pillow
12}:
13
14buildPythonPackage rec {
15 pname = "tesserocr";
16 version = "2.5.1";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "0cc7d4r11z26rhcwpmcc42fi9kr3f20nq5pk84jrczr18i0g99mh";
21 };
22
23 nativeBuildInputs = [ cython pkg-config ];
24 buildInputs = [ leptonica tesseract ];
25 propagatedBuildInputs = [ pillow ];
26
27 meta = with lib; {
28 description = "A simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR)";
29 homepage = "https://github.com/sirfz/tesserocr";
30 license = licenses.mit;
31 maintainers = with maintainers; [ mtrsk ];
32 platforms = platforms.linux;
33 };
34}