2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
2018-12-18 19:02:13 +01:00
|
|
|
, leptonica, libpng, libtiff, icu, pango, opencl-headers }:
|
2018-12-18 19:02:12 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "tesseract";
|
2018-12-18 19:02:12 +01:00
|
|
|
version = "3.05.00";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tesseract-ocr";
|
|
|
|
repo = "tesseract";
|
|
|
|
rev = version;
|
2022-05-02 12:38:49 +02:00
|
|
|
hash = "sha256-YHj00gG/3SW0ILTiQwphiCxuP9OCDya27hyFQB27mYc=";
|
2018-12-18 19:02:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-05-02 12:38:50 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
leptonica
|
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
icu
|
|
|
|
pango
|
|
|
|
opencl-headers
|
|
|
|
];
|
2018-12-18 19:02:12 +01:00
|
|
|
|
|
|
|
LIBLEPT_HEADERSDIR = "${leptonica}/include";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCR engine";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/tesseract-ocr/tesseract";
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.asl20;
|
2022-06-26 19:12:18 +02:00
|
|
|
maintainers = with lib.maintainers; [ viric erikarvstedt ];
|
2021-01-15 14:21:58 +01:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2018-12-18 19:02:12 +01:00
|
|
|
};
|
|
|
|
}
|