From 81e2df3ce1e2db7e34cc54668848fbe095f7e80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Fri, 27 Nov 2020 13:45:31 +0100 Subject: [PATCH] minecraft: use copyDesktopItems hook --- pkgs/games/minecraft/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 1b4cf319721..f419be8d63b 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -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";