anchor.diff:  
       HOST_SH = "${bash}/bin/sh";
   
  -    # not using bsd binutils
       SHLIB_WARNTEXTREL = "no";
       SHLIB_MKMAP = "no";
       PRESERVE = "-p";
  +    OBJCOPY = if stdenv.isDarwin then "true" else "objcopy";
   
       MACHINE_ARCH = hostPlatform.parsed.cpu.name;
       MACHINE_CPU = hostPlatform.parsed.cpu.name;
  
positive.code:         --replace rogue "" \
          --replace sail "" \
          --replace trek "" \
  	--replace dab ""
        substituteInPlace Makefile.inc \
          --replace 2555 555 \
          --replace 2550 550
  
negative.code:       "-D__scanflike(a,b)="
        "-D__va_list=va_list"
        "-D__warn_references(a,b)="
      ] ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)=";
      propagatedBuildInputs = [ compat ];
      MKDOC = "no"; # missing vfontedpr
      MKPIC = if stdenv.isDarwin then "no" else "yes";
      patchPhase = lib.optionalString (!stdenv.isDarwin) ''
        substituteInPlace printw.c \
          --replace "funopen(win, NULL, __winwrite, NULL, NULL)" NULL \
          --replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));'
  