Merge remote-tracking branch 'upstream/staging' into strictDeps

This commit is contained in:
John Ericson
2018-05-14 23:33:03 -04:00
4956 changed files with 139392 additions and 92187 deletions

View File

@@ -44,7 +44,11 @@ stdenv.mkDerivation rec {
# HACK, see #10874 (and 14664)
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv;
setupHook = ./gettext-setup-hook.sh;
setupHooks = [
../../../build-support/setup-hooks/role.bash
./gettext-setup-hook.sh
];
gettextNeedsLdflags = hostPlatform.libc != "glibc" && !hostPlatform.isMusl;
enableParallelBuilding = true;

View File

@@ -1,7 +1,17 @@
gettextDataDirsHook() {
# See pkgs/build-support/setup-hooks/role.bash
getHostRoleEnvHook
if [ -d "$1/share/gettext" ]; then
addToSearchPath GETTEXTDATADIRS "$1/share/gettext"
addToSearchPath "GETTEXTDATADIRS${role_post}" "$1/share/gettext"
fi
}
addEnvHooks "$hostOffset" gettextDataDirsHook
# libintl must be listed in load flags on non-Glibc
# it doesn't hurt to have it in Glibc either though
if [ ! -z "@gettextNeedsLdflags@" ]; then
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
export NIX_${role_pre}LDFLAGS+=" -lintl"
fi