1 { lib, stdenv, fetchurl, tk }:
3 stdenv.mkDerivation rec {
8 url = "https://www-e.uni-magdeburg.de/jschulen/ocr/gocr-${version}.tar.gz";
9 sha256 = "11l6gds1lrm8lwrrsxnm5fjlwz8q1xbh896cprrl4psz21in946z";
12 buildFlags = [ "all" "libs" ];
13 installFlags = [ "libdir=/lib/" ]; # Specify libdir so Makefile will also install library.
15 preInstall = "mkdir -p $out/lib";
18 for i in pgm2asc.h gocr.h; do
19 install -D -m644 src/$i $out/include/gocr/$i
24 sed -i -e 's|exec wish|exec ${tk}/bin/wish|' $out/bin/gocr.tcl
28 homepage = "https://jocr.sourceforge.net/";
29 description = "GPL Optical Character Recognition";
30 license = lib.licenses.gpl2;
31 platforms = lib.platforms.linux;