2012-04-29 16:09:58 +02:00
|
|
|
{stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
|
2013-01-28 02:58:47 +01:00
|
|
|
, mesa, openal, alsaOss }:
|
2012-04-29 16:09:58 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-01-18 01:57:01 +01:00
|
|
|
name = "minecraft-1.4.7";
|
2012-04-29 16:09:58 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar";
|
2013-01-18 01:57:01 +01:00
|
|
|
sha256 = "92db974aa759a3f17f3cd61550fa5010e335c57dd813dad9e39b9cc013420a49";
|
2012-04-29 16:09:58 +02: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/
|
2013-01-28 02:58:47 +01:00
|
|
|
${alsaOss}/bin/aoss ${jre}/bin/java -jar $out/minecraft.jar
|
2012-04-29 16:09:58 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/minecraft
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A sandbox-building game";
|
|
|
|
homepage = http://www.minecraft.net;
|
2014-01-22 04:34:41 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.page ];
|
2012-04-29 16:09:58 +02:00
|
|
|
license = "unfree-redistributable";
|
|
|
|
};
|
|
|
|
}
|