From 82ebace595bd3de93b697681180fa13e4fd6b491 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 28 Jan 2018 22:17:04 -0500 Subject: [PATCH] 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 --- pkgs/development/libraries/glib/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 656cdffbb4c7..f68bd1380052 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -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)