From cc449015e9a25276525237f8f34f316ae707b708 Mon Sep 17 00:00:00 2001 From: mtrsk Date: Fri, 29 Nov 2019 23:26:00 -0300 Subject: [PATCH] python3Packages.tesserocr: init at 2.5.0 --- .../python-modules/tesserocr/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/tesserocr/default.nix diff --git a/pkgs/development/python-modules/tesserocr/default.nix b/pkgs/development/python-modules/tesserocr/default.nix new file mode 100644 index 00000000000..2d4f9d10a8c --- /dev/null +++ b/pkgs/development/python-modules/tesserocr/default.nix @@ -0,0 +1,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; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 72283056a54..666df8ee53d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1325,6 +1325,8 @@ in { tableaudocumentapi = callPackage ../development/python-modules/tableaudocumentapi { }; + tesserocr = callPackage ../development/python-modules/tesserocr { }; + trueskill = callPackage ../development/python-modules/trueskill { }; trustme = callPackage ../development/python-modules/trustme {};