nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 lzip,
6 texinfo,
7 libpng,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "ocrad";
12 version = "0.29";
13
14 src = fetchurl {
15 url = "mirror://gnu/ocrad/ocrad-${finalAttrs.version}.tar.lz";
16 hash = "sha256-ESAMxrC3uhaISnLcy1jvaU96omzSsgQeVVWA8GTS2ek=";
17 };
18
19 nativeBuildInputs = [
20 lzip # unpack
21 ];
22
23 buildInputs = [
24 texinfo
25 libpng
26 ];
27
28 doCheck = true;
29
30 meta = {
31 description = "Optical character recognition (OCR) program & library";
32 longDescription = ''
33 GNU Ocrad is an OCR (Optical Character Recognition) program based on
34 a feature extraction method. It reads images in pbm (bitmap), pgm
35 (greyscale) or ppm (color) formats and produces text in byte (8-bit)
36 or UTF-8 formats.
37
38 Also includes a layout analyser able to separate the columns or
39 blocks of text normally found on printed pages.
40
41 Ocrad can be used as a stand-alone console application, or as a
42 backend to other programs.
43 '';
44
45 license = lib.licenses.gpl3Plus;
46 maintainers = with lib.maintainers; [ pSub ];
47 platforms = lib.platforms.unix;
48 mainProgram = "ocrad";
49 };
50})