depot/third_party/nixpkgs/pkgs/development/python-modules/tesserocr/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

57 lines
1,000 B
Nix

{ buildPythonPackage
, fetchPypi
, lib
# build dependencies
, cython
, leptonica
, pkg-config
, tesseract
# propagates
, pillow
# tests
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "tesserocr";
version = "2.5.2";
src = fetchPypi {
inherit pname version;
sha256 = "1bmj76gi8401lcqdaaznfmz9yf11myy1bzivqwwq08z3dwzxswck";
};
nativeBuildInputs = [
cython
pkg-config
];
buildInputs = [
leptonica
tesseract
];
propagatedBuildInputs = [
pillow
];
pythonImportsCheck = [
"tesserocr"
];
nativeCheckInputs = [
unittestCheckHook
];
meta = with lib; {
changelog = "https://github.com/sirfz/tesserocr/releases/tag/v${version}";
description = "A simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR)";
homepage = "https://github.com/sirfz/tesserocr";
license = licenses.mit;
maintainers = with maintainers; [ mtrsk ];
platforms = platforms.linux;
};
}