depot/third_party/nixpkgs/pkgs/development/python-modules/pytesseract/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

50 lines
921 B
Nix

{
buildPythonPackage,
fetchFromGitHub,
lib,
packaging,
pillow,
tesseract,
substituteAll,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "pytesseract";
version = "0.3.13";
format = "pyproject";
src = fetchFromGitHub {
owner = "madmaze";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-gQMeck6ojlIwyiOCBBhzHHrjQfBMelVksVGd+fyxWZk=";
};
patches = [
(substituteAll {
src = ./tesseract-binary.patch;
drv = tesseract;
})
];
nativeBuildInputs = [ setuptools ];
buildInputs = [ tesseract ];
propagatedBuildInputs = [
packaging
pillow
];
nativeCheckInputs = [ pytestCheckHook ];
meta = with lib; {
homepage = "https://pypi.org/project/pytesseract/";
license = licenses.asl20;
description = "Python wrapper for Google Tesseract";
mainProgram = "pytesseract";
maintainers = [ ];
};
}