1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 17:25:11 +00:00
nixpkgs/pkgs/applications/graphics/gocr/default.nix

33 lines
818 B
Nix
Raw Normal View History

2012-11-23 21:22:52 +00:00
{ stdenv, fetchurl, tk }:
stdenv.mkDerivation rec {
name = "gocr-0.51";
src = fetchurl {
url = "https://www-e.uni-magdeburg.de/jschulen/ocr/${name}.tar.gz";
sha256 = "14i6zi6q11h6d0qds2cpvgvhbxk5xaa027h8cd0wy1zblh7sxckf";
};
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
'';
meta = {
homepage = http://jocr.sourceforge.net/;
description = "GPL Optical Character Recognition";
license = stdenv.lib.licenses.gpl2;
2012-11-23 21:18:36 +00:00
platforms = stdenv.lib.platforms.linux;
};
}