Skip to content

Commit 0fa3bce

Browse files
committed
libiconvReal: make default on Darwin
The Darwin libiconv tries to be compatible with GNU libiconv, but it’s not. Recent versions of Autoconf and gnulib include checks for issues in Darwin’s libiconv implementation, which has effectively turned `autoreconfHook` into `autoBreakDarwinHook` due to failing to link libiconv. Instead of continuing to work around it, make GNU libiconv the default. With the UTF-8-MAC patch, it should be a drop-in replacement.
1 parent 1ed0648 commit 0fa3bce

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

pkgs/stdenv/darwin/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ let
277277
sdkPackages = prevStage: {
278278
inherit (prevStage)
279279
bashNonInteractive
280+
libiconvReal
280281
libpng
281282
libxml2
282283
libxo
@@ -291,7 +292,6 @@ let
291292
Csu
292293
adv_cmds
293294
copyfile
294-
libiconv
295295
libresolv
296296
libsbuf
297297
libutil
@@ -557,9 +557,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
557557
# Use this stage’s CF to build CMake. It’s required but can’t be included in the stdenv.
558558
cmake = self.cmakeMinimal;
559559

560-
# Use libiconvReal with gettext to break an infinite recursion.
561-
gettext = super.gettext.override { libiconv = super.libiconvReal; };
562-
563560
# Disable grep’s tests for now due to impure locale updates in
564561
# macOS 15.4 breaking them in the bootstrap.
565562
gnugrep = super.gnugrep.overrideAttrs { doCheck = false; };
@@ -1050,6 +1047,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
10501047
ld64.lib
10511048
ld64.out
10521049
libffi.out
1050+
libiconv.out
10531051
libxml2.out
10541052
ncurses.dev
10551053
ncurses.man
@@ -1076,7 +1074,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
10761074
binutils
10771075
binutils.bintools
10781076
libcxx
1079-
libiconv.out
10801077
libresolv.out
10811078
libsbuf.out
10821079
libSystem
@@ -1192,8 +1189,8 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
11921189
assert isFromNixpkgs prevStage.binutils-unwrapped.src;
11931190
assert isBuiltByNixpkgsCompiler prevStage.curl;
11941191

1195-
# libiconv should be an alias for darwin.libiconv
1196-
assert prevStage.libiconv == prevStage.darwin.libiconv;
1192+
# libiconv should be an alias for libiconvReal
1193+
assert prevStage.libiconv == prevStage.libiconvReal;
11971194

11981195
{
11991196
inherit (prevStage) config overlays stdenv;

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6676,8 +6676,6 @@ with pkgs;
66766676
]
66776677
then
66786678
libcIconv pkgs.libc
6679-
else if stdenv.hostPlatform.isDarwin then
6680-
darwin.libiconv
66816679
else
66826680
libiconvReal;
66836681

0 commit comments

Comments
 (0)