Merge pull request #37835 from dtzWill/fix/musl-libiconv

"libiconv" fixes re:musl
This commit is contained in:
Will Dietz 2018-03-25 23:40:20 -05:00 committed by GitHub
commit 01b254ec50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -73,9 +73,6 @@ stdenv.mkDerivation rec {
# internal pcre would only add <200kB, but it's relatively common
configureFlags = [ "--with-pcre=system" ]
++ optional stdenv.isDarwin "--disable-compile-warnings"
# 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)

View File

@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = true;
doCheck = !stdenv.hostPlatform.isMusl; /* iconv binary */
meta = with stdenv.lib; {
homepage = http://man-db.nongnu.org;

View File

@ -9977,7 +9977,7 @@ with pkgs;
# We also provide `libiconvReal`, which will always be a standalone libiconv,
# just in case you want it regardless of platform.
libiconv =
if hostPlatform.libc == "glibc"
if (hostPlatform.libc == "glibc" || hostPlatform.libc == "musl")
then glibcIconv (if hostPlatform != buildPlatform
then libcCross
else stdenv.cc.libc)