Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tesseract: 5.3.4 -> 5.5.0 #353902

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions pkgs/applications/graphics/tesseract/tesseract5.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 ];
khaneliman marked this conversation as resolved.
Show resolved Hide resolved
platforms = lib.platforms.unix;
mainProgram = "tesseract";
};
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/pytesseract/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ buildPythonPackage rec {
packaging
pillow
];
disabledTests = [
# https://github.com/madmaze/pytesseract/pull/559
"incorrect_tessdata_dir"
"invalid_tessdata_dir"
];

nativeCheckInputs = [ pytestCheckHook ];

Expand Down