Add minecraft

Patch by Carles Pagès, minor modification (adding in version number, updating
sha256) by me

svn path=/nixpkgs/trunk/; revision=33944
This commit is contained in:
Shea Levy 2012-04-29 14:09:58 +00:00
parent 6c37520d2a
commit 23506543a4
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,36 @@
{stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
, mesa, openal}:
stdenv.mkDerivation {
name = "minecraft-1.2.5";
src = fetchurl {
url = "https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar";
sha256 = "0yp3wgy93wm746dkv6kbljhmzdqbcg4qhwkvnaaq4ml84mvvjp38";
};
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;
maintainers = [ "Carles Pagès <page@cubata.homelinux.net>" stdenv.lib.maintainers.shlevy ];
license = "unfree-redistributable";
};
}

View File

@ -1003,6 +1003,8 @@ let
mdbtools_git = callPackage ../tools/misc/mdbtools/git.nix { }; mdbtools_git = callPackage ../tools/misc/mdbtools/git.nix { };
minecraft = callPackage ../games/minecraft { };
miniupnpc = callPackage ../tools/networking/miniupnpc { }; miniupnpc = callPackage ../tools/networking/miniupnpc { };
miniupnpd = callPackage ../tools/networking/miniupnpd { }; miniupnpd = callPackage ../tools/networking/miniupnpd { };