minecraft: use copyDesktopItems hook

This commit is contained in:
Fabian Möller 2020-11-27 13:45:31 +01:00 committed by Milan Pässler
parent ab345bed75
commit 81e2df3ce1

View file

@ -1,6 +1,7 @@
{ stdenv
, fetchurl
, nixosTests
, copyDesktopItems
, makeDesktopItem
, makeWrapper
, wrapGAppsHook
@ -38,7 +39,6 @@ let
comment = "Official launcher for Minecraft, a sandbox-building game";
desktopName = "Minecraft Launcher";
categories = "Game;";
fileValidation = false;
};
envLibPath = stdenv.lib.makeLibraryPath [
@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
sha256 = "0w8z21ml79kblv20wh5lz037g130pxkgs8ll9s3bi94zn2pbrhim";
};
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
nativeBuildInputs = [ makeWrapper wrapGAppsHook copyDesktopItems ];
buildInputs = [ gobject-introspection ];
sourceRoot = ".";
@ -110,11 +110,14 @@ stdenv.mkDerivation rec {
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/opt
mv minecraft-launcher $out/opt
${desktopItem.buildCommand}
install -D $icon $out/share/icons/hicolor/symbolic/apps/minecraft-launcher.svg
runHook postInstall
'';
preFixup = ''
@ -140,6 +143,8 @@ stdenv.mkDerivation rec {
"''${gappsWrapperArgs[@]}"
'';
desktopItems = [ desktopItem ];
meta = with stdenv.lib; {
description = "Official launcher for Minecraft, a sandbox-building game";
homepage = "https://minecraft.net";