mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
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.
This commit is contained in:
parent
20c2ce4954
commit
40b661a850
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl, makeDesktopItem
|
{ stdenv, fetchurl, makeDesktopItem
|
||||||
, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
|
, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
|
||||||
|
, openjdk
|
||||||
, mesa, openal
|
, mesa, openal
|
||||||
, useAlsa ? false, alsaOss ? null }:
|
, useAlsa ? false, alsaOss ? null }:
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -7,15 +8,10 @@ with stdenv.lib;
|
|||||||
assert useAlsa -> alsaOss != null;
|
assert useAlsa -> alsaOss != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
icon = fetchurl {
|
|
||||||
url = "https://hydra-media.cursecdn.com/minecraft.gamepedia.com/c/c5/Grass.png";
|
|
||||||
sha256 = "438c0f63e379e92af1b5b2e06cc5e3365ee272810af65ebc102304bce4fa8c4b";
|
|
||||||
};
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "minecraft";
|
name = "minecraft";
|
||||||
exec = "minecraft";
|
exec = "minecraft";
|
||||||
icon = "${icon}";
|
icon = "minecraft";
|
||||||
comment = "A sandbox-building game";
|
comment = "A sandbox-building game";
|
||||||
desktopName = "Minecraft";
|
desktopName = "Minecraft";
|
||||||
genericName = "minecraft";
|
genericName = "minecraft";
|
||||||
@ -49,6 +45,9 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
ln -s ${desktopItem}/share/applications/* $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 = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user