2016-12-19 12:05:30 +00:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, leptonica, libpng, libtiff
|
|
|
|
, icu, pango, opencl-headers
|
2015-05-22 06:45:59 +01:00
|
|
|
}:
|
|
|
|
|
2013-06-11 18:22:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tesseract-${version}";
|
2016-12-19 12:05:30 +00:00
|
|
|
version = "3.04.01";
|
2011-04-24 19:04:07 +01:00
|
|
|
|
2016-12-19 12:05:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tesseract-ocr";
|
|
|
|
repo = "tesseract";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0h1x4z1h86n2gwknd0wck6gykkp99bmm02lg4a47a698g4az6ybv";
|
2011-04-24 19:04:07 +01:00
|
|
|
};
|
|
|
|
|
2016-12-19 12:05:30 +00:00
|
|
|
tessdata = fetchFromGitHub {
|
|
|
|
owner = "tesseract-ocr";
|
|
|
|
repo = "tessdata";
|
|
|
|
rev = "3cf1e2df1fe1d1da29295c9ef0983796c7958b7d";
|
|
|
|
sha256 = "1v4b63v5nzcxr2y3635r19l7lj5smjmc9vfk0wmxlryxncb4vpg7";
|
|
|
|
};
|
2012-06-11 11:28:28 +01:00
|
|
|
|
2016-12-19 12:05:30 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ leptonica libpng libtiff icu pango opencl-headers ];
|
2016-02-20 22:33:10 +00:00
|
|
|
|
2016-12-19 12:05:30 +00:00
|
|
|
LIBLEPT_HEADERSDIR = "${leptonica}/include";
|
2011-04-24 19:04:07 +01:00
|
|
|
|
2016-12-19 12:05:30 +00:00
|
|
|
postInstall = "cp -Rt \"$out/share/tessdata\" \"$tessdata/\"*";
|
2011-04-24 21:01:19 +01:00
|
|
|
|
2011-04-24 19:04:07 +01:00
|
|
|
meta = {
|
|
|
|
description = "OCR engine";
|
|
|
|
homepage = http://code.google.com/p/tesseract-ocr/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2011-04-24 19:04:07 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|