diff options
-rw-r--r-- | lib/maintainers.nix | 1 | ||||
-rw-r--r-- | pkgs/games/minecraft/default.nix | 26 |
2 files changed, 24 insertions, 3 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 1cd88a7ec2a23..f8c7c2e21e5b3 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -278,6 +278,7 @@ rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>"; rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>"; rvlander = "Gaëtan André <rvlander@gaetanandre.eu>"; + ryantm = "Ryan Mulligan <ryan@ryantm.com>"; rycee = "Robert Helgesson <robert@rycee.net>"; samuelrivas = "Samuel Rivas <samuelrivas@gmail.com>"; sander = "Sander van der Burg <s.vanderburg@tudelft.nl>"; diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 218a84d591d32..6f3093585b44b 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -1,10 +1,27 @@ -{ stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm +{ stdenv, fetchurl, makeDesktopItem +, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm , mesa, openal , useAlsa ? false, alsaOss ? null }: assert useAlsa -> alsaOss != null; -stdenv.mkDerivation { +let + icon = fetchurl { + url = "https://hydra-media.cursecdn.com/minecraft.gamepedia.com/c/c5/Grass.png"; + sha256 = "438c0f63e379e92af1b5b2e06cc5e3365ee272810af65ebc102304bce4fa8c4b"; + }; + + desktopItem = makeDesktopItem { + name = "minecraft"; + exec = "minecraft"; + icon = "${icon}"; + comment = "A sandbox-building game"; + desktopName = "Minecraft"; + genericName = "minecraft"; + categories = "Game;"; + }; + +in stdenv.mkDerivation { name = "minecraft-2015.07.24"; src = fetchurl { @@ -29,12 +46,15 @@ stdenv.mkDerivation { EOF chmod +x $out/bin/minecraft + + mkdir -p $out/share/applications + ln -s ${desktopItem}/share/applications/* $out/share/applications/ ''; meta = { description = "A sandbox-building game"; homepage = http://www.minecraft.net; - maintainers = [ stdenv.lib.maintainers.page ]; + maintainers = with stdenv.lib.maintainers; [ page ryantm ]; license = stdenv.lib.licenses.unfreeRedistributable; }; } |