From 40b661a8500fc6b0f98e809db9259ca0f6191bd8 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Thu, 9 Jun 2016 07:02:26 -0700 Subject: [PATCH] minecraft: use icon in jar This removes the dependency on a wiki image download, which seemed bad when I first introduced it. Unfortunately, they do not provide a 48x48 icon so we are not satisfying the minimal XDG standard. --- pkgs/games/minecraft/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index f3a8a34fa3b8..6bceb40b523b 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, makeDesktopItem , jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm +, openjdk , mesa, openal , useAlsa ? false, alsaOss ? null }: with stdenv.lib; @@ -7,15 +8,10 @@ with stdenv.lib; assert useAlsa -> alsaOss != null; 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}"; + icon = "minecraft"; comment = "A sandbox-building game"; desktopName = "Minecraft"; genericName = "minecraft"; @@ -49,6 +45,9 @@ in stdenv.mkDerivation { mkdir -p $out/share/applications ln -s ${desktopItem}/share/applications/* $out/share/applications/ + + ${openjdk}/bin/jar xf $out/minecraft.jar favicon.png + install -D favicon.png $out/share/icons/hicolor/32x32/apps/minecraft.png ''; meta = {