anchor.diff:  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;
  
positive.code:       makeFlagsArray=(CC=$CC);
      '';
  
      buildFlags = if stdenv.isDarwin then "macosx" else "";
  
      installPhase = ''
        mkdir -p $out/lib/lua/${lua.luaversion}
  
negative.code: 
      preBuild = ''
        makeFlagsArray=(
          ${platformString}
          LUAPATH="$out/lib/lua/${lua.luaversion}"
          LUACPATH="$out/lib/lua/${lua.luaversion}"
          INC_PATH="-I${lua}/include"
  