From d7ebb03b7b4b3908e48ed83b8276d6532c172491 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 29 Jun 2025 12:24:44 +0200 Subject: [PATCH 1/2] html2text: fix build with gettext 0.25 --- pkgs/by-name/ht/html2text/gettext-0.25.patch | 29 ++++++++++++++++++++ pkgs/by-name/ht/html2text/package.nix | 11 +++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/ht/html2text/gettext-0.25.patch diff --git a/pkgs/by-name/ht/html2text/gettext-0.25.patch b/pkgs/by-name/ht/html2text/gettext-0.25.patch new file mode 100644 index 0000000000000..e0cbf73095a3e --- /dev/null +++ b/pkgs/by-name/ht/html2text/gettext-0.25.patch @@ -0,0 +1,29 @@ +diff --git a/Makefile.am b/Makefile.am +index af28077..e746147 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -13,6 +13,8 @@ + AUTOMAKE_OPTIONS = foreign + ACLOCAL_AMFLAGS = -I m4 + ++SUBDIRS = ++ + AM_YFLAGS = -d -Wno-yacc + + bin_PROGRAMS = html2text +diff --git a/configure.ac b/configure.ac +index af3ce8e..a80d1fd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,8 +15,11 @@ + + AC_PREREQ([2.71]) + AC_INIT([html2text], [2.2.3], [BUG-REPORT-ADDRESS]) ++AC_CONFIG_MACRO_DIRS([m4]) + AM_INIT_AUTOMAKE + AM_MAINTAINER_MODE([disable]) ++AM_GNU_GETTEXT_VERSION([0.20]) ++AM_GNU_GETTEXT([external]) + AM_ICONV + #AC_CONFIG_SRCDIR([html.h]) + #AC_CONFIG_HEADERS([config.h]) diff --git a/pkgs/by-name/ht/html2text/package.nix b/pkgs/by-name/ht/html2text/package.nix index 7e6e46d6033f0..f4aa4e61ee843 100644 --- a/pkgs/by-name/ht/html2text/package.nix +++ b/pkgs/by-name/ht/html2text/package.nix @@ -3,6 +3,7 @@ stdenv, fetchFromGitLab, autoreconfHook, + gettext, libiconv, }: @@ -17,7 +18,15 @@ stdenv.mkDerivation rec { hash = "sha256-7Ch51nJ5BeRqs4PEIPnjCGk+Nm2ydgJQCtkcpihXun8="; }; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ + autoreconfHook + gettext + ]; + + # These changes have all been made in HEAD, across several commits + # amongst other changes. + # See https://gitlab.com/grobian/html2text/-/merge_requests/57 + patches = [ ./gettext-0.25.patch ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; From f779a712c2416be14838db1188071616ac0362f8 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 29 Jun 2025 12:36:57 +0200 Subject: [PATCH 2/2] html2text: 2.2.3 -> 2.3.0 --- pkgs/by-name/ht/html2text/gettext-0.25.patch | 4 ++-- pkgs/by-name/ht/html2text/package.nix | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ht/html2text/gettext-0.25.patch b/pkgs/by-name/ht/html2text/gettext-0.25.patch index e0cbf73095a3e..ebc2aa9a01886 100644 --- a/pkgs/by-name/ht/html2text/gettext-0.25.patch +++ b/pkgs/by-name/ht/html2text/gettext-0.25.patch @@ -12,13 +12,13 @@ index af28077..e746147 100644 bin_PROGRAMS = html2text diff --git a/configure.ac b/configure.ac -index af3ce8e..a80d1fd 100644 +index 999c6fe..30c2536 100644 --- a/configure.ac +++ b/configure.ac @@ -15,8 +15,11 @@ AC_PREREQ([2.71]) - AC_INIT([html2text], [2.2.3], [BUG-REPORT-ADDRESS]) + AC_INIT([html2text], [2.3.0], [BUG-REPORT-ADDRESS]) +AC_CONFIG_MACRO_DIRS([m4]) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE([disable]) diff --git a/pkgs/by-name/ht/html2text/package.nix b/pkgs/by-name/ht/html2text/package.nix index f4aa4e61ee843..80969c8e34a48 100644 --- a/pkgs/by-name/ht/html2text/package.nix +++ b/pkgs/by-name/ht/html2text/package.nix @@ -2,24 +2,28 @@ lib, stdenv, fetchFromGitLab, + autoconf-archive, autoreconfHook, + bison, gettext, libiconv, }: stdenv.mkDerivation rec { pname = "html2text"; - version = "2.2.3"; + version = "2.3.0"; src = fetchFromGitLab { owner = "grobian"; repo = "html2text"; rev = "v${version}"; - hash = "sha256-7Ch51nJ5BeRqs4PEIPnjCGk+Nm2ydgJQCtkcpihXun8="; + hash = "sha256-e/KWyc7lOdWhtFC7ZAD7sYgCsO3JzGkLUThVI7edqIQ="; }; nativeBuildInputs = [ + autoconf-archive autoreconfHook + bison gettext ];