diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 3ef348dc4b8..6b094fdc839 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -10,6 +10,17 @@ stdenv.mkDerivation (rec { configureFlags = "--disable-csharp"; + # On cross building, gettext supposes that the wchar.h from libc + # does not fulfill gettext needs, so it tries to work with its + # own wchar.h file, which does not cope well with the system's + # wchar.h and stddef.h (gcc-4.3 - glibc-2.9) + preConfigure = '' + if test -n "$crossConfig"; then + echo gl_cv_func_wcwidth_works=yes > cachefile + configureFlags="$configureFlags --cache-file=`pwd`/cachefile" + fi + ''; + meta = { description = "GNU gettext, a well integrated set of translation tools and documentation";