anchor.diff:      preBuild = ''
         makeFlagsArray=(
           LUAV=${lua.luaversion}
  -        PLAT=${if stdenv.isDarwin then "macosx"
  -               else if stdenv.isFreeBSD then "freebsd"
  -               else if stdenv.isLinux then "linux"
  -               else if stdenv.isSunOS then "solaris"
  -               else throw "unsupported platform"}
  +        PLAT=${platformString}
           prefix=$out
         );
       '';
  
positive.code: 
      preBuild = ''
        makeFlagsArray=(
          ${if stdenv.isLinux then "linux"
            else if stdenv.isDarwin then "macosx"
            else "bsd"}
          LUAPATH="$out/lib/lua/${lua.luaversion}"
          LUACPATH="$out/lib/lua/${lua.luaversion}"
          INC_PATH="-I${lua}/include"
  
negative.code: let
    isLua51 = lua.luaversion == "5.1";
    isLua52 = lua.luaversion == "5.2";
  
    platformString =
      if stdenv.isDarwin then "macosx"
      else if stdenv.isFreeBSD then "freebsd"
      else if stdenv.isLinux then "linux"
      else if stdenv.isSunOS then "solaris"
      else throw "unsupported platform";
  
    self = _self;
    _self = with self; {
    inherit lua;
  