mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
minecraft: use copyDesktopItems hook
This commit is contained in:
parent
ab345bed75
commit
81e2df3ce1
1 changed files with 8 additions and 3 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue