anchor.diff:        cd "$ZANGBAND_PATH"
         for i in $(find "$ORIG_PATH" -type f); do
           REL_PATH="''${i#$ORIG_PATH/}"
  -	mkdir -p "$(dirname "$REL_PATH")"
  -	ln -s "$i" "$REL_PATH" &>/dev/null
  +        mkdir -p "$(dirname "$REL_PATH")"
  +        ln -s "$i" "$REL_PATH" &>/dev/null
         done
         mkdir -p lib/user lib/save
         for i in lib/*/*.raw; do
  
positive.code: { stdenv, fetchurl, ncurses, flex, bison, autoconf, automake, m4, coreutils }:
  
  stdenv.mkDerivation rec {
    name = "zangband-${version}";
    version = "2.7.3";
  
    src = fetchurl {
      url = "ftp://ftp.sunet.se/pub/games/Angband/Variant/ZAngband/zangband-${version}.tar.gz";
      sha256 = "0654m8fzklsc8565sqdad76mxjsm1z9c280srq8863sd10af0bdq";
    };
  
    buildInputs = [
      ncurses flex bison autoconf automake m4
    ];
  
    # fails during chmod due to broken permissions
    dontMakeSourcesWritable = true;
    postUnpack = ''
      chmod a+rwX -R .
    '';
  
    preConfigure = ''
      sed -re 's/ch(own|grp|mod)/true/' -i lib/*/makefile.zb makefile.in
      sed -e '/FIXED_PATHS/d' -i src/z-config.h
      ./bootstrap
    '';
  
    preInstall = ''
  
negative.code:   meta = {
      description = "Rogue-like game";
      license = stdenv.lib.licenses.unfree;
      broken = true; # broken in runtime, will not get pass character generation
    };
  }
  