Fix libiconv handling when using a crossSystem

This commit is contained in:
William A. Kennington III 2015-05-31 18:00:33 -07:00
parent faf33749ce
commit d4f176f70d

View File

@ -6871,8 +6871,11 @@ let
# glibc provides libiconv so systems with glibc don't need to build libiconv
# separately, but we also provide libiconvReal, which will always be a
# standalone libiconv, just in case you want it
libiconv =
if stdenv.isGlibc then stdenv.cc.libc
libiconv = if crossSystem != null then
(if crossSystem.libc == "glibc" then libcCross
else if crossSystem.libc == "libSystem" then darwin.libiconv
else libiconvReal)
else if stdenv.isGlibc then stdenv.cc.libc
else if stdenv.isDarwin then darwin.libiconv
else libiconvReal;