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