2018-11-16 17:44:07 +00:00
|
|
|
{ buildPythonPackage, fetchPypi, lib, pillow, tesseract, substituteAll }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytesseract";
|
2019-08-20 13:22:35 +01:00
|
|
|
version = "0.2.9";
|
2018-11-16 17:44:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-08-20 13:22:35 +01:00
|
|
|
sha256 = "1mjr3pa4fycdsl7xk9s8fpn2vhpgx7mrdnn5h4lyyjhz86195ivg";
|
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; {
|
|
|
|
homepage = https://pypi.org/project/pytesseract/;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
description = "A Python wrapper for Google Tesseract";
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|