From cc868aaade3b42396ef70f4598fb92d4b087faad Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:35:44 +0200 Subject: [PATCH] extractpdfmark: fix build with gettext 0.25 --- .../ex/extractpdfmark/gettext-0.25.patch | 15 +++++++++++++++ pkgs/by-name/ex/extractpdfmark/package.nix | 18 ++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 pkgs/by-name/ex/extractpdfmark/gettext-0.25.patch diff --git a/pkgs/by-name/ex/extractpdfmark/gettext-0.25.patch b/pkgs/by-name/ex/extractpdfmark/gettext-0.25.patch new file mode 100644 index 000000000000..e3ee1dc7cfaa --- /dev/null +++ b/pkgs/by-name/ex/extractpdfmark/gettext-0.25.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index 2e7d562..c8dd741 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7,6 +7,10 @@ AC_INIT([Extract PDFmark], [1.1.1], , [extractpdfmark], + AM_INIT_AUTOMAKE([foreign]) + AC_CONFIG_SRCDIR([src/main.cc]) + AC_CONFIG_HEADERS([config.h]) ++AC_CONFIG_MACRO_DIRS([m4]) ++ ++AM_GNU_GETTEXT_VERSION([0.25]) ++AM_GNU_GETTEXT([external]) + + PACKAGE_COPYRIGHT="Copyright (C) 2016-2022 Masamichi Hosoda" + PACKAGE_LICENSE="License: GPL3+" diff --git a/pkgs/by-name/ex/extractpdfmark/package.nix b/pkgs/by-name/ex/extractpdfmark/package.nix index 8594820134f3..fd4820b872bc 100644 --- a/pkgs/by-name/ex/extractpdfmark/package.nix +++ b/pkgs/by-name/ex/extractpdfmark/package.nix @@ -20,22 +20,28 @@ stdenv.mkDerivation rec { hash = "sha256-pNc/SWAtQWMbB2+lIQkJdBYSZ97iJXK71mS59qQa7Hs="; }; + patches = [ + ./gettext-0.25.patch + ]; + + strictDeps = true; + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ - ghostscript poppler - texlive.combined.scheme-minimal ]; - postPatch = '' - touch config.rpath - ''; - doCheck = true; + nativeCheckInputs = [ + ghostscript + texlive.combined.scheme-minimal + ]; + meta = with lib; { homepage = "https://github.com/trueroad/extractpdfmark"; description = "Extract page mode and named destinations as PDFmark from PDF";