summary refs log tree commit diff
path: root/pkgs/tools/graphics/unpaper/default.nix
blob: b7fe0f6955ca60338272452ddedcb68902af6c39 (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
{ lib
, stdenv
, fetchurl

# build
, meson
, ninja
, pkg-config

# docs
, sphinx

# runtime
, buildPackages
, ffmpeg_5-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_5-headless
  ];

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

  meta = with lib; {
    homepage = "https://www.flameeyes.eu/projects/unpaper";
    description = "Post-processing tool for scanned sheets of paper";
    license = licenses.gpl2;
    platforms = platforms.all;
    maintainers = [ maintainers.rycee ];
  };
}