Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenv
3, fetchurl
4
5# build
6, meson
7, ninja
8, pkg-config
9
10# docs
11, sphinx
12
13# runtime
14, buildPackages
15, ffmpeg_5-headless
16
17# tests
18, nixosTests
19}:
20
21stdenv.mkDerivation rec {
22 pname = "unpaper";
23 version = "7.0.0";
24
25 src = fetchurl {
26 url = "https://www.flameeyes.eu/files/${pname}-${version}.tar.xz";
27 hash = "sha256-JXX7vybCJxnRy4grWWAsmQDH90cRisEwiD9jQZvkaoA=";
28 };
29
30 outputs = [
31 "out"
32 "man"
33 ];
34
35 nativeBuildInputs = [
36 buildPackages.libxslt.bin
37 meson
38 ninja
39 pkg-config
40 sphinx
41 ];
42
43 buildInputs = [
44 ffmpeg_5-headless
45 ];
46
47 passthru.tests = {
48 inherit (nixosTests) paperless;
49 };
50
51 meta = with lib; {
52 homepage = "https://www.flameeyes.eu/projects/unpaper";
53 description = "Post-processing tool for scanned sheets of paper";
54 license = licenses.gpl2;
55 platforms = platforms.all;
56 maintainers = [ maintainers.rycee ];
57 };
58}