tesseract: 5.3.4 -> 5.5.0 (#353902)

This commit is contained in:
Austin Horstman 2024-11-28 13:06:03 -06:00 committed by GitHub
commit 4b8921fde4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 41 additions and 20 deletions

View File

@ -1,17 +1,31 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
, curl, leptonica, libarchive, libpng, libtiff, icu, pango, opencl-headers
, Accelerate, CoreGraphics, CoreVideo
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
autoreconfHook,
pkg-config,
curl,
leptonica,
libarchive,
libpng,
libtiff,
icu,
pango,
Accelerate,
CoreGraphics,
CoreVideo,
}:
stdenv.mkDerivation rec {
pname = "tesseract";
version = "5.3.4";
version = "5.5.0";
src = fetchFromGitHub {
owner = "tesseract-ocr";
repo = "tesseract";
rev = version;
sha256 = "sha256-IKxzDhSM+BPsKyQP3mADAkpRSGHs4OmdFIA+Txt084M=";
sha256 = "sha256-qyckAQZs3gR1NBqWgE+COSKXhv3kPF+iHVQrt6OPi8s=";
};
enableParallelBuilding = true;
@ -21,26 +35,28 @@ stdenv.mkDerivation rec {
autoreconfHook
];
buildInputs = [
curl
leptonica
libarchive
libpng
libtiff
icu
pango
opencl-headers
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Accelerate
CoreGraphics
CoreVideo
];
buildInputs =
[
curl
leptonica
libarchive
libpng
libtiff
icu
pango
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Accelerate
CoreGraphics
CoreVideo
];
passthru.updateScript = nix-update-script { };
meta = {
description = "OCR engine";
homepage = "https://github.com/tesseract-ocr/tesseract";
license = lib.licenses.asl20;
maintainers = [ ];
maintainers = with lib.maintainers; [ patrickdag ];
platforms = lib.platforms.unix;
mainProgram = "tesseract";
};

View File

@ -37,6 +37,11 @@ buildPythonPackage rec {
packaging
pillow
];
disabledTests = [
# https://github.com/madmaze/pytesseract/pull/559
"incorrect_tessdata_dir"
"invalid_tessdata_dir"
];
nativeCheckInputs = [ pytestCheckHook ];