2018-11-16 17:44:07 +00:00
|
|
|
{ buildPythonPackage, fetchPypi, lib, pillow, tesseract, substituteAll }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytesseract";
|
2021-02-20 09:09:15 +00:00
|
|
|
version = "0.3.7";
|
2018-11-16 17:44:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 09:09:15 +00:00
|
|
|
sha256 = "4ecfc898d00a70fcc38d2bce729de1597c67e7bc5d2fa26094714c9f5b573645";
|
2018-11-16 17:44:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./tesseract-binary.patch;
|
2019-09-09 00:38:31 +01:00
|
|
|
drv = tesseract;
|
2018-11-16 17:44:07 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ tesseract ];
|
|
|
|
propagatedBuildInputs = [ pillow ];
|
|
|
|
|
|
|
|
# the package doesn't have any tests.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pypi.org/project/pytesseract/";
|
2019-12-26 19:14:48 +00:00
|
|
|
license = licenses.asl20;
|
2018-11-16 17:44:07 +00:00
|
|
|
description = "A Python wrapper for Google Tesseract";
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|