2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, leptonica, libpng, libtiff, icu, pango, opencl-headers }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tesseract";
|
|
|
|
version = "3.05.00";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tesseract-ocr";
|
|
|
|
repo = "tesseract";
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-YHj00gG/3SW0ILTiQwphiCxuP9OCDya27hyFQB27mYc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
leptonica
|
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
icu
|
|
|
|
pango
|
|
|
|
opencl-headers
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
LIBLEPT_HEADERSDIR = "${leptonica}/include";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCR engine";
|
|
|
|
homepage = "https://github.com/tesseract-ocr/tesseract";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.asl20;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with lib.maintainers; [ viric erikarvstedt ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|