Skip to content

Commit ee38ccf

Browse files
committed
libiconvReal: build with bootstrap SDK to avoid infinite recursion on Darwin
1 parent 7353500 commit ee38ccf

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

pkgs/development/libraries/libiconv/default.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
fetchurl,
33
stdenv,
44
lib,
5+
darwin,
56
updateAutotoolsGnuConfigScriptsHook,
67
enableStatic ? stdenv.hostPlatform.isStatic,
78
enableShared ? !stdenv.hostPlatform.isStatic,
@@ -10,7 +11,12 @@
1011

1112
# assert !stdenv.hostPlatform.isLinux || stdenv.hostPlatform != stdenv.buildPlatform; # TODO: improve on cross
1213

13-
stdenv.mkDerivation rec {
14+
let
15+
# libiconv is propagated by the SDK in the stdenv. Avoid an infinite recursion by using a stdenv
16+
# with an SDK that does not try to propagate it.
17+
stdenv' = if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv;
18+
in
19+
stdenv'.mkDerivation rec {
1420
pname = "libiconv";
1521
version = "1.19";
1622

@@ -121,6 +127,6 @@ stdenv.mkDerivation rec {
121127
mainProgram = "iconv";
122128

123129
# This library is not needed on GNU platforms.
124-
hydraPlatforms = with lib.platforms; cygwin ++ darwin ++ freebsd;
130+
hydraPlatforms = lib.platforms.cygwin ++ lib.platforms.darwin ++ lib.platforms.freebsd;
125131
};
126132
}

0 commit comments

Comments
 (0)