2021-10-20 08:27:05 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, poppler
|
2022-07-22 10:13:45 +00:00
|
|
|
, fetchpatch
|
2021-10-20 08:27:05 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pdftoipe";
|
|
|
|
version = "7.2.24.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "otfried";
|
|
|
|
repo = "ipe-tools";
|
|
|
|
rev = "v${version}";
|
2023-06-03 15:56:44 +00:00
|
|
|
hash = "sha256-jlrjrjzZQo79CKMySayhCm1dqLh89wOQuXrXa2aqc0k=";
|
2021-10-20 08:27:05 +00:00
|
|
|
};
|
2022-07-22 10:13:45 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Fix build with poppler > 22.03.0
|
|
|
|
# https://github.com/otfried/ipe-tools/pull/48
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/otfried/ipe-tools/commit/14335180432152ad094300d0afd00d8e390469b2.patch";
|
2023-06-03 15:56:44 +00:00
|
|
|
hash = "sha256-V3FmwG3bR6io/smxjasFJ5K0/u8RSFfdUX41ClGXhFc=";
|
2022-07-22 10:13:45 +00:00
|
|
|
stripLen = 1;
|
2023-06-03 15:56:44 +00:00
|
|
|
name = "poppler_fix_build_48.patch";
|
|
|
|
})
|
|
|
|
# https://github.com/otfried/ipe-tools/pull/55
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/otfried/ipe-tools/commit/65586fcd9cc39e482ae5a9abdb6f4932d9bb88c4.patch";
|
|
|
|
hash = "sha256-qr1AQyWHz1e2a65m05xSHFnP6oSP6qSmMVekNk2flRc=";
|
|
|
|
stripLen = 1;
|
|
|
|
name = "poppler_fix_build_55.patch";
|
2022-07-22 10:13:45 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-07-25 13:27:31 +00:00
|
|
|
sourceRoot = "${src.name}/pdftoipe";
|
2021-10-20 08:27:05 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ poppler ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D pdftoipe $out/bin/pdftoipe
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A program that tries to convert arbitrary PDF documents to Ipe files";
|
|
|
|
homepage = "https://github.com/otfried/ipe-tools";
|
2023-06-03 15:56:44 +00:00
|
|
|
changelog = "https://github.com/otfried/ipe-tools/releases";
|
2021-10-20 08:27:05 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ yrd ];
|
|
|
|
};
|
|
|
|
}
|