2019-06-16 19:59:06 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
|
2018-12-18 18:02:13 +00:00
|
|
|
, leptonica, libpng, libtiff, icu, pango, opencl-headers }:
|
2018-12-18 18:02:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tesseract";
|
2018-12-18 18:02:12 +00:00
|
|
|
version = "3.05.00";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tesseract-ocr";
|
|
|
|
repo = "tesseract";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "11wrpcfl118wxsv2c3w2scznwb48c4547qml42s2bpdz079g8y30";
|
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
|
|
|
buildInputs = [ leptonica libpng libtiff icu pango opencl-headers ];
|
|
|
|
|
|
|
|
LIBLEPT_HEADERSDIR = "${leptonica}/include";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCR engine";
|
|
|
|
homepage = https://github.com/tesseract-ocr/tesseract;
|
|
|
|
license = stdenv.lib.licenses.asl20;
|
2018-12-18 18:02:13 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ viric earvstedt ];
|
2018-12-18 18:02:12 +00:00
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
}
|