From 94a5e9a6980e6614b8ab1e3ef8eb9fb78cad6bee Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 2 Jul 2025 13:36:50 +0200 Subject: [PATCH] dosfstools: fix build --- pkgs/by-name/do/dosfstools/gettext-0.25.patch | 42 +++++++++++++++++++ pkgs/by-name/do/dosfstools/package.nix | 8 +--- 2 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 pkgs/by-name/do/dosfstools/gettext-0.25.patch diff --git a/pkgs/by-name/do/dosfstools/gettext-0.25.patch b/pkgs/by-name/do/dosfstools/gettext-0.25.patch new file mode 100644 index 0000000000000..3b90d968ffa2a --- /dev/null +++ b/pkgs/by-name/do/dosfstools/gettext-0.25.patch @@ -0,0 +1,42 @@ +From 893a84738606a8ac588ba1e9d4145cbbcbfff811 Mon Sep 17 00:00:00 2001 +From: Alyssa Ross +Date: Wed, 2 Jul 2025 12:03:53 +0200 +Subject: [PATCH] Fix autoreconf with gettext 0.25 + +This fixes the following error that appeared when running autoreconf +after updating to gettext 0.25: + + configure.ac:76: error: possibly undefined macro: AM_ICONV + If this token and others are legitimate, please use m4_pattern_allow. + See the Autoconf documentation. + autoreconf: error: /nix/store/dvpiwvz7an7icljfscdi76h11c03cma4-autoconf-2.72/bin/autoconf failed with exit status: 1 + +The version of gettext given in AM_GNU_GETTEXT_VERSION() is picked +quite arbitrarily based on what's likely to be available in distros, +since gettext itself is not actually used here, just some supporting +stuff from it. + +Link: https://github.com/dosfstools/dosfstools/pull/218 +--- + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index efb8fb5..2cecab1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,8 +15,11 @@ + # along with this program. If not, see . + + AC_INIT([dosfstools], [4.2]) ++AC_CONFIG_MACRO_DIRS([m4]) + AC_SUBST([RELEASE_DATE], [2021-01-31]) + AM_INIT_AUTOMAKE([1.11 foreign subdir-objects parallel-tests]) ++AM_GNU_GETTEXT_VERSION([0.20]) ++AM_GNU_GETTEXT([external]) + + AC_ARG_ENABLE([compat-symlinks], + [AS_HELP_STRING([--enable-compat-symlinks], +-- +2.49.0 + diff --git a/pkgs/by-name/do/dosfstools/package.nix b/pkgs/by-name/do/dosfstools/package.nix index 9446485273d30..2ebf8b479b742 100644 --- a/pkgs/by-name/do/dosfstools/package.nix +++ b/pkgs/by-name/do/dosfstools/package.nix @@ -39,19 +39,15 @@ stdenv.mkDerivation rec { url = "https://github.com/dosfstools/dosfstools/commit/8da7bc93315cb0c32ad868f17808468b81fa76ec.patch"; sha256 = "sha256-Quegj5uYZgACgjSZef6cjrWQ64SToGQxbxyqCdl8C7o="; }) + ./gettext-0.25.patch ]; nativeBuildInputs = [ autoreconfHook + gettext pkg-config ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; - # configure.ac:75: error: required file './config.rpath' not found - # https://github.com/dosfstools/dosfstools/blob/master/autogen.sh - postPatch = '' - cp ${gettext}/share/gettext/config.rpath config.rpath - ''; - configureFlags = [ "--enable-compat-symlinks" ]; nativeCheckInputs = [ xxd ];