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