2012-04-29 15:09:58 +01:00
|
|
|
{stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
|
|
|
|
, mesa, openal}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2012-08-09 22:39:57 +01:00
|
|
|
name = "minecraft-1.3.1";
|
2012-04-29 15:09:58 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar";
|
2012-08-09 22:39:57 +01:00
|
|
|
sha256 = "0j8a889w174vwgcxl4yqgp2kbqqha3x505fn7izz38srlx59gnwj";
|
2012-04-29 15:09:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = "installPhase";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
set -x
|
|
|
|
mkdir -pv $out/bin
|
|
|
|
cp -v $src $out/minecraft.jar
|
|
|
|
|
|
|
|
cat > $out/bin/minecraft << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
|
|
|
|
# wrapper for minecraft
|
|
|
|
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${jre}/lib/${jre.architecture}/:${libX11}/lib/:${libXext}/lib/:${libXcursor}/lib/:${libXrandr}/lib/:${libXxf86vm}/lib/:${mesa}/lib/:${openal}/lib/
|
|
|
|
${jre}/bin/java -jar $out/minecraft.jar
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/minecraft
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A sandbox-building game";
|
|
|
|
homepage = http://www.minecraft.net;
|
2012-08-09 22:39:57 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.page stdenv.lib.maintainers.shlevy ];
|
2012-04-29 15:09:58 +01:00
|
|
|
license = "unfree-redistributable";
|
|
|
|
};
|
|
|
|
}
|