2012-11-23 22:22:52 +01:00
|
|
|
{ stdenv, fetchurl, tk }:
|
2007-11-09 14:54:02 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-11-10 01:35:56 +01:00
|
|
|
name = "gocr-0.52";
|
2010-07-29 20:55:16 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://www-e.uni-magdeburg.de/jschulen/ocr/${name}.tar.gz";
|
2018-11-10 01:35:56 +01:00
|
|
|
sha256 = "11l6gds1lrm8lwrrsxnm5fjlwz8q1xbh896cprrl4psz21in946z";
|
2010-07-29 20:55:16 +02:00
|
|
|
};
|
|
|
|
|
2017-09-09 01:28:39 +02:00
|
|
|
buildFlags = [ "all" "libs" ];
|
|
|
|
installFlags = [ "libdir=/lib/" ]; # Specify libdir so Makefile will also install library.
|
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/lib";
|
|
|
|
|
2012-11-23 22:22:52 +01:00
|
|
|
postInstall = ''
|
2017-09-09 01:28:39 +02:00
|
|
|
for i in pgm2asc.h gocr.h; do
|
|
|
|
install -D -m644 src/$i $out/include/gocr/$i
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
2012-11-23 22:22:52 +01:00
|
|
|
sed -i -e 's|exec wish|exec ${tk}/bin/wish|' $out/bin/gocr.tcl
|
|
|
|
'';
|
|
|
|
|
2010-07-29 20:55:16 +02:00
|
|
|
meta = {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://jocr.sourceforge.net/;
|
2010-07-29 20:55:16 +02:00
|
|
|
description = "GPL Optical Character Recognition";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2012-11-23 22:18:36 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-07-29 20:55:16 +02:00
|
|
|
};
|
2007-11-09 14:54:02 +01:00
|
|
|
}
|