anchor.diff: -{ stdenv, lib, fetchurl, libiconv, xz }:
  +{ stdenv, lib, hostPlatform, fetchurl, libiconv, xz }:
   
   stdenv.mkDerivation rec {
     name = "gettext-${version}";
  
positive.code: // stdenv.lib.optionalAttrs stdenv.isDarwin {
    makeFlags = "CFLAGS=-D_FORTIFY_SOURCE=0";
  }
  
  // stdenv.lib.optionalAttrs stdenv.isCygwin {
    patchPhase =
     # Make sure `error.c' gets compiled and is part of `libgettextlib.la'.
     # This fixes:
     # gettext-0.18.1.1/gettext-tools/src/msgcmp.c:371: undefined reference to `_error_message_count'
    '' 
     sed -i gettext-tools/gnulib-lib/Makefile.in \
            -e 's/am_libgettextlib_la_OBJECTS =/am_libgettextlib_la_OBJECTS = error.lo/g'
     '';
  }
  
negative.code:    substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd
     substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd
     substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd
    '' + lib.optionalString hostPlatform.isCygwin ''
      sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
      sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
    '';
  
    # On cross building, gettext supposes that the wchar.h from libc
  