libiconv: add setup-hook

This commit is contained in:
Matthew Bauer 2018-03-14 14:14:46 -05:00
parent 90c132c7f1
commit 9e75fb5eb4
2 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "0y1ij745r4p48mxq84rax40p10ln7fc7m243p8k8sia519i3dxfc";
};
setupHook = ./setup-hook.sh;
postPatch =
lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)
''

View File

@ -0,0 +1,7 @@
# libintl must be listed in load flags on non-Glibc
# it doesn't hurt to have it in Glibc either though
iconvLdflags() {
export NIX_LDFLAGS="$NIX_LDFLAGS -iconv"
}
addEnvHooks "$hostOffset" iconvLdflags