1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 03:25:02 +00:00
nixpkgs/pkgs/games/minecraft/default.nix
Shea Levy ca116f76f9 Unmaintain a bunch of packages
Trying to take maintainership more seriously...

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-21 22:34:41 -05:00

37 lines
1 KiB
Nix

{stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
, mesa, openal, alsaOss }:
stdenv.mkDerivation {
name = "minecraft-1.4.7";
src = fetchurl {
url = "https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar";
sha256 = "92db974aa759a3f17f3cd61550fa5010e335c57dd813dad9e39b9cc013420a49";
};
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/
${alsaOss}/bin/aoss ${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 = [ stdenv.lib.maintainers.page ];
license = "unfree-redistributable";
};
}