2018-11-16 18:44:07 +01:00
|
|
|
{ buildPythonPackage, fetchPypi, lib, pillow, tesseract, substituteAll }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytesseract";
|
2020-04-19 22:42:26 +02:00
|
|
|
version = "0.3.4";
|
2018-11-16 18:44:07 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-04-19 22:42:26 +02:00
|
|
|
sha256 = "16l9b9f5v0a9j5jfgpd8irk9yhc9byzirrzv1rlkapdbz36sbn5g";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|