nixpkgs/pkgs/applications/graphics/gocr/default.nix
Silvan Mosberger 57bccb3cb8 treewide: http -> https sources (#42676)
* treewide: http -> https sources

This updates the source urls of all top-level packages from http to
https where possible.

* buildtorrent: fix url and tab -> spaces
2018-06-28 20:43:35 +02:00

33 lines
818 B
Nix

{ 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";
};
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";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}