depot/third_party/nixpkgs/pkgs/development/python-modules/pytesseract/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

50 lines
939 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 = with maintainers; [ ];
};
}