Skip to content

Commit 51dd50e

Browse files
committed
libiconv: build with bootstrap SDK to avoid infinite recursion on Darwin
1 parent 4657eb4 commit 51dd50e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pkgs/development/libraries/libiconv/default.nix

Lines changed: 7 additions & 1 deletion
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.18";
1622

0 commit comments

Comments
 (0)