about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/pdfmixtool/default.nix
blob: 2aeca54c1e96623fac5baaf0785d83e8363de43d (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
, mkDerivation
, fetchFromGitLab
, fetchpatch
, fetchpatch2
, cmake
, pkg-config
, qtbase
, qttools
, qpdf
, podofo
, imagemagick
}:

mkDerivation rec {
  pname = "pdfmixtool";
  version = "1.1.1";

  src = fetchFromGitLab {
    owner = "scarpetta";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-fgtRKUG6J/CM6cXUTHWAPemqL8loWZT3wZmGdRHldq8=";
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs = [
    imagemagick
    qtbase
    qttools
    qpdf
    podofo
  ];

  patches = [
    # fix incompatibility with qpdf11.3.0 usage of c++17 - delete this patch when we reach pdfmixtool version > v1.1.1
    (fetchpatch {
      url = "https://gitlab.com/scarpetta/pdfmixtool/-/commit/bd5f78c3a4d977d9b0c74302ce2521c737189b43.diff";
      hash = "sha256-h2g5toFqgEEnObd2TYQms1a1WFTgN7VsIHyy0Uyq4/I=";
    })
    # https://gitlab.com/scarpetta/pdfmixtool/-/merge_requests/14
    (fetchpatch2 {
      url = "https://gitlab.com/scarpetta/pdfmixtool/-/commit/268291317ccd1805dc1c801ff88641ba06c6a7f0.patch";
      hash = "sha256-56bDoFtE+IOQHcV9xPfyrgYYFvTfB0QiLIfRl91irb0=";
    })
  ];

  meta = with lib; {
    description = "An application to split, merge, rotate and mix PDF files";
    mainProgram = "pdfmixtool";
    homepage = "https://gitlab.com/scarpetta/pdfmixtool";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ onny ];
  };
}