about summary refs log tree commit diff
path: root/pkgs/tools/graphics/unpaper/default.nix
blob: dc38c55397a2d7e3ce4767a8196803f149097a51 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
{ lib
, stdenv
, fetchurl

# build
, meson
, ninja
, pkg-config

# docs
, sphinx

# runtime
, buildPackages
, ffmpeg-headless

# tests
, nixosTests
}:

stdenv.mkDerivation rec {
  pname = "unpaper";
  version = "7.0.0";

  src = fetchurl {
    url = "https://www.flameeyes.eu/files/${pname}-${version}.tar.xz";
    hash = "sha256-JXX7vybCJxnRy4grWWAsmQDH90cRisEwiD9jQZvkaoA=";
  };

  outputs = [
    "out"
    "man"
  ];

  nativeBuildInputs = [
    buildPackages.libxslt.bin
    meson
    ninja
    pkg-config
    sphinx
  ];

  buildInputs = [
    ffmpeg-headless
  ];

  passthru.tests = {
    inherit (nixosTests) paperless;
  };

  meta = with lib; {
    homepage = "https://www.flameeyes.eu/projects/unpaper";
    changelog = "https://github.com/unpaper/unpaper/blob/unpaper-${version}/NEWS";
    description = "Post-processing tool for scanned sheets of paper";
    license = licenses.gpl2Only;
    platforms = platforms.all;
    mainProgram = "unpaper";
    maintainers = [ maintainers.rycee ];
  };
}