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