gnutar: make sure libiconv is linked

gnutar’s `configure` detects libiconv but fails to link it on Darwin.

+28 -8
+5 -8
pkgs/tools/archivers/gnutar/default.nix
··· 17 17 sha256 = "sha256-TWL/NzQux67XSFNTI5MMfPlKz3HDWRiCsmp+pQ8+3BY="; 18 18 }; 19 19 20 - # avoid retaining reference to CF during stdenv bootstrap 21 - configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ 22 - "gt_cv_func_CFPreferencesCopyAppValue=no" 23 - "gt_cv_func_CFLocaleCopyCurrent=no" 24 - "gt_cv_func_CFLocaleCopyPreferredLanguages=no" 25 - ]; 20 + # GNU tar fails to link libiconv even though the configure script detects it. 21 + # https://savannah.gnu.org/bugs/index.php?64441 22 + patches = [ ./link-libiconv.patch ]; 26 23 27 24 # gnutar tries to call into gettext between `fork` and `exec`, 28 25 # which is not safe on darwin. ··· 33 30 34 31 outputs = [ "out" "info" ]; 35 32 36 - nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook 37 - ++ lib.optional (!stdenv.hostPlatform.isDarwin) updateAutotoolsGnuConfigScriptsHook; 33 + nativeBuildInputs = [ autoreconfHook ]; 34 + 38 35 # Add libintl on Darwin specifically as it fails to link (or skip) 39 36 # NLS on it's own: 40 37 # "_libintl_textdomain", referenced from: