summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/oc/ocrad/package.nix
blob: 32cbf8b034e06af56a341c35b6d4706794a9ff0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  lib,
  stdenv,
  fetchurl,
  lzip,
  texinfo,
  libpng,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "ocrad";
  version = "0.29";

  src = fetchurl {
    url = "mirror://gnu/ocrad/ocrad-${finalAttrs.version}.tar.lz";
    hash = "sha256-ESAMxrC3uhaISnLcy1jvaU96omzSsgQeVVWA8GTS2ek=";
  };

  nativeBuildInputs = [
    lzip # unpack
  ];

  buildInputs = [
    texinfo
    libpng
  ];

  doCheck = true;

  meta = {
    description = "Optical character recognition (OCR) program & library";
    longDescription = ''
      GNU Ocrad is an OCR (Optical Character Recognition) program based on
      a feature extraction method.  It reads images in pbm (bitmap), pgm
      (greyscale) or ppm (color) formats and produces text in byte (8-bit)
      or UTF-8 formats.

      Also includes a layout analyser able to separate the columns or
      blocks of text normally found on printed pages.

      Ocrad can be used as a stand-alone console application, or as a
      backend to other programs.
    '';

    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ pSub ];
    platforms = lib.platforms.unix;
    mainProgram = "ocrad";
  };
})