2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
2024-06-05 15:53:02 +00:00
|
|
|
, curl, leptonica, libarchive, libpng, libtiff, icu, pango, opencl-headers
|
2022-09-09 14:08:57 +00:00
|
|
|
, Accelerate, CoreGraphics, CoreVideo
|
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tesseract";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "5.3.4";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tesseract-ocr";
|
|
|
|
repo = "tesseract";
|
|
|
|
rev = version;
|
2024-02-07 01:22:34 +00:00
|
|
|
sha256 = "sha256-IKxzDhSM+BPsKyQP3mADAkpRSGHs4OmdFIA+Txt084M=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
curl
|
2022-04-27 09:35:20 +00:00
|
|
|
leptonica
|
2024-01-02 11:29:13 +00:00
|
|
|
libarchive
|
2022-04-27 09:35:20 +00:00
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
icu
|
|
|
|
pango
|
|
|
|
opencl-headers
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-09-09 14:08:57 +00:00
|
|
|
Accelerate
|
|
|
|
CoreGraphics
|
|
|
|
CoreVideo
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCR engine";
|
|
|
|
homepage = "https://github.com/tesseract-ocr/tesseract";
|
|
|
|
license = lib.licenses.asl20;
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = [ ];
|
2022-09-09 14:08:57 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "tesseract";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|