anchor.diff:      })
     ] ++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ];
   
  -  nativeBuildInputs = [ pkgconfig ];
  -  buildInputs = [ ncurses boehmgc gettext zlib ]
  +  postPatch = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
  +    ln -s ${mktable}/bin/mktable mktable
  +    # stop make from recompiling mktable
  +    sed -ie 's!mktable.*:.*!mktable:!' Makefile.in
  +  '';
  +
  +  nativeBuildInputs = [ pkgconfig gettext ];
  +  buildInputs = [ ncurses boehmgc zlib ]
       ++ optional sslSupport openssl
       ++ optional mouseSupport gpm-ncurses
       ++ optional graphicsSupport imlib2
  
positive.code:   PERL = "${perl}/bin/perl";
    MAN = "${man}/bin/man";
  
    patches = [
      ./RAND_egd.libressl.patch
      (fetchpatch {
  
negative.code: , graphicsSupport ? true, imlib2 ? null
  , x11Support ? graphicsSupport, libX11 ? null
  , mouseSupport ? !stdenv.isDarwin, gpm-ncurses ? null
  , perl, man, pkgconfig, buildPackages, w3m
  }:
  
  assert sslSupport -> openssl != null;
  