sbomnix: 1.7.0 -> 1.7.1
[NixPkgs.git] / pkgs / by-name / pd / pdftoipe / package.nix
blob70e3fc58f3d9fe7bbf151545c24eab8c8400dbef
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   pkg-config,
6   poppler,
7   fetchpatch,
8 }:
10 stdenv.mkDerivation rec {
11   pname = "pdftoipe";
12   version = "7.2.24.1";
14   src = fetchFromGitHub {
15     owner = "otfried";
16     repo = "ipe-tools";
17     rev = "v${version}";
18     hash = "sha256-jlrjrjzZQo79CKMySayhCm1dqLh89wOQuXrXa2aqc0k=";
19   };
21   patches = [
22     # Fix build with poppler > 22.03.0
23     # https://github.com/otfried/ipe-tools/pull/48
24     (fetchpatch {
25       url = "https://github.com/otfried/ipe-tools/commit/14335180432152ad094300d0afd00d8e390469b2.patch";
26       hash = "sha256-V3FmwG3bR6io/smxjasFJ5K0/u8RSFfdUX41ClGXhFc=";
27       stripLen = 1;
28       name = "poppler_fix_build_48.patch";
29     })
30     # https://github.com/otfried/ipe-tools/pull/55
31     (fetchpatch {
32       url = "https://github.com/otfried/ipe-tools/commit/65586fcd9cc39e482ae5a9abdb6f4932d9bb88c4.patch";
33       hash = "sha256-qr1AQyWHz1e2a65m05xSHFnP6oSP6qSmMVekNk2flRc=";
34       stripLen = 1;
35       name = "poppler_fix_build_55.patch";
36     })
37   ];
39   sourceRoot = "${src.name}/pdftoipe";
41   nativeBuildInputs = [ pkg-config ];
42   buildInputs = [ poppler ];
44   installPhase = ''
45     install -D pdftoipe $out/bin/pdftoipe
46   '';
48   meta = with lib; {
49     description = "Program that tries to convert arbitrary PDF documents to Ipe files";
50     homepage = "https://github.com/otfried/ipe-tools";
51     changelog = "https://github.com/otfried/ipe-tools/releases";
52     license = licenses.gpl3Plus;
53     maintainers = with maintainers; [ yrd ];
54     mainProgram = "pdftoipe";
55   };