2018-11-16 17:44:07 +00:00
|
|
|
{ buildPythonPackage, fetchPypi, lib, pillow, tesseract, substituteAll }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytesseract";
|
2020-03-11 21:20:10 +00:00
|
|
|
version = "0.3.3";
|
2018-11-16 17:44:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-03-11 21:20:10 +00:00
|
|
|
sha256 = "0lml55jrvdzy9fm31zpw64fqc4d6p5djg1ax2kgnimzfscxghh8h";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|