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