2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, tk }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "gocr";
|
|
|
|
version = "0.52";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://www-e.uni-magdeburg.de/jschulen/ocr/gocr-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "11l6gds1lrm8lwrrsxnm5fjlwz8q1xbh896cprrl4psz21in946z";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildFlags = [ "all" "libs" ];
|
|
|
|
installFlags = [ "libdir=/lib/" ]; # Specify libdir so Makefile will also install library.
|
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/lib";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in pgm2asc.h gocr.h; do
|
|
|
|
install -D -m644 src/$i $out/include/gocr/$i
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
sed -i -e 's|exec wish|exec ${tk}/bin/wish|' $out/bin/gocr.tcl
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://jocr.sourceforge.net/";
|
|
|
|
description = "GPL Optical Character Recognition";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|