diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index a35d2380eded..9c3024ce25fb 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -48,6 +48,8 @@ stdenv.mkDerivation rec { # HACK, see #10874 (and 14664) buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; + setupHook = ./gettext-setup-hook.sh; + enableParallelBuilding = true; meta = { diff --git a/pkgs/development/libraries/gettext/gettext-setup-hook.sh b/pkgs/development/libraries/gettext/gettext-setup-hook.sh new file mode 100644 index 000000000000..fe3ef1f9e15d --- /dev/null +++ b/pkgs/development/libraries/gettext/gettext-setup-hook.sh @@ -0,0 +1,7 @@ +gettextDataDirsHook() { + if [ -d "$1/share/gettext" ]; then + addToSearchPath GETTEXTDATADIRS "$1/share/gettext" + fi +} + +envHooks+=(gettextDataDirsHook)