94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
45 lines
974 B
Nix
45 lines
974 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.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tesseract-ocr";
|
|
repo = "tesseract";
|
|
rev = version;
|
|
sha256 = "sha256-Glpu6CURCL3kI8MAeXbF9OWCRjonQZvofWsv1wVWz08=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|