diff options
author | Fabian Möller <fabianm88@gmail.com> | 2020-11-27 13:45:31 +0100 |
---|---|---|
committer | Milan Pässler <milan@petabyte.dev> | 2020-11-29 04:17:12 +0100 |
commit | 81e2df3ce1e2db7e34cc54668848fbe095f7e80c (patch) | |
tree | fa252ace6933a6e5e689c0eb4a98a94d00b2deea /pkgs/games/minecraft/default.nix | |
parent | ab345bed75d14f48443f18992d4439c5a7359f0b (diff) |
minecraft: use copyDesktopItems hook
Diffstat (limited to '')
-rw-r--r-- | pkgs/games/minecraft/default.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 1b4cf3197210..f419be8d63bf 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"; |