2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
46 lines
1,005 B
Nix
46 lines
1,005 B
Nix
{ lib, stdenv, fetchFromGitHub, autoreconfHook, autoconf-archive, pkg-config
|
|
, leptonica, libpng, libtiff, icu, pango, opencl-headers, fetchpatch
|
|
, Accelerate, CoreGraphics, CoreVideo
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tesseract";
|
|
version = "5.3.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tesseract-ocr";
|
|
repo = "tesseract";
|
|
rev = version;
|
|
sha256 = "sha256-/aGzwm2+0y8fheOnRi/OJXZy3o0xjY1cCq+B3GTzfos=";
|
|
};
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
autoreconfHook
|
|
autoconf-archive
|
|
];
|
|
|
|
buildInputs = [
|
|
leptonica
|
|
libpng
|
|
libtiff
|
|
icu
|
|
pango
|
|
opencl-headers
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
Accelerate
|
|
CoreGraphics
|
|
CoreVideo
|
|
];
|
|
|
|
meta = {
|
|
description = "OCR engine";
|
|
homepage = "https://github.com/tesseract-ocr/tesseract";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ anselmschueler ];
|
|
platforms = lib.platforms.unix;
|
|
mainProgram = "tesseract";
|
|
};
|
|
}
|