glibc: Fix Darwin build

Fix the failure caused in #34198 by a suggested change of mine. @vcunat
reported in [1].

[1]: https://github.com/NixOS/nixpkgs/pull/34198#issuecomment-361075911
This commit is contained in:
John Ericson 2018-01-28 22:17:04 -05:00
parent e2a54266c4
commit 82ebace595

View File

@ -75,7 +75,9 @@ stdenv.mkDerivation rec {
# internal pcre would only add <200kB, but it's relatively common
configureFlags = [ "--with-pcre=system" ]
++ optional stdenv.isDarwin "--disable-compile-warnings"
++ optional (stdenv.hostPlatform.libc != "glibc") "--with-libiconv=gnu"
# glibc inclues GNU libiconv, but Darwin's iconv function is good enonugh.
++ optional (stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isDarwin)
"--with-libiconv=gnu"
++ optional stdenv.isSunOS "--disable-dtrace"
# Can't run this test when cross-compiling
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform)