anchor.diff:      else abort "Unknown platform for NetHack";
     unixHint =
       if stdenv.isLinux then "linux"
  +    else if stdenv.isDarwin then "macosx10.10"
       # We probably want something different for Darwin
       else "unix";
     userDir = "~/.config/nethack";
  
positive.code: 
    makeFlags = [ "PREFIX=$(out)" ];
  
    configurePhase = ''
      cd sys/${platform}
      ${lib.optionalString (platform == "unix") ''
        sed -e '/^ *cd /d' -i nethack.sh
        ${lib.optionalString (unixHint == "linux") ''
          sed \
            -e 's,/bin/gzip,${gzip}/bin/gzip,g' \
            -e 's,^WINTTYLIB=.*,WINTTYLIB=-lncurses,' \
            -i hints/linux
        ''}
        sh setup.sh hints/${unixHint}
      ''}
      cd ../..
  
      sed -e '/define CHDIR/d' -i include/config.h
      sed \
        -e 's/^YACC *=.*/YACC = bison -y/' \
        -e 's/^LEX *=.*/LEX = flex/' \
        -i util/Makefile
    '';
  
    postInstall = ''
  
negative.code:       chmod -R +w ${userDir}
      fi
  
      RUNDIR=\$(mktemp -d)
  
      cleanup() {
        rm -rf \$RUNDIR
  