about summary refs log tree commit diff
path: root/pkgs/applications/misc/pdfarranger/default.nix
blob: 2973a4b9a36cd0deeaf74ef1abb924af09af9770 (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
{ fetchFromGitHub
, lib
, wrapGAppsHook
, python3Packages
, gtk3
, poppler_gi
, libhandy
}:

python3Packages.buildPythonApplication rec {
  pname = "pdfarranger";
  version = "1.10.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pdfarranger";
    repo = "pdfarranger";
    rev = "refs/tags/${version}";
    hash = "sha256-l//DeaIqUl6FdGFxM8yTKcTjVNvYMllorcoXoK33Iy4=";
  };

  nativeBuildInputs = [
    wrapGAppsHook
  ] ++ (with python3Packages; [
    setuptools
  ]);

  buildInputs = [
    gtk3
    poppler_gi
    libhandy
  ];

  propagatedBuildInputs = with python3Packages; [
    pygobject3
    pikepdf
    img2pdf
    setuptools
    python-dateutil
  ];

  # incompatible with wrapGAppsHook
  strictDeps = false;
  dontWrapGApps = true;
  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  doCheck = false; # no tests

  meta = with lib; {
    inherit (src.meta) homepage;
    description = "Merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface";
    mainProgram = "pdfarranger";
    platforms = platforms.linux;
    maintainers = with maintainers; [ symphorien ];
    license = licenses.gpl3Plus;
    changelog = "https://github.com/pdfarranger/pdfarranger/releases/tag/${version}";
  };
}