nix: use .desktop file provided by cmake
This commit is contained in:
parent
7df5091fdc
commit
b710b719a8
@ -1,7 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, makeDesktopItem
|
|
||||||
, cmake
|
, cmake
|
||||||
, ninja
|
, ninja
|
||||||
, jdk8
|
, jdk8
|
||||||
@ -73,27 +72,11 @@ mkDerivation rec {
|
|||||||
"-DLauncher_LAYOUT=lin-system"
|
"-DLauncher_LAYOUT=lin-system"
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
|
||||||
name = "polymc";
|
|
||||||
exec = "polymc";
|
|
||||||
icon = "polymc";
|
|
||||||
desktopName = "PolyMC";
|
|
||||||
genericName = "Minecraft Launcher";
|
|
||||||
comment = "A custom launcher for Minecraft";
|
|
||||||
categories = "Game;";
|
|
||||||
extraEntries = ''
|
|
||||||
Keywords=game;Minecraft;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm644 ../launcher/resources/multimc/scalable/launcher.svg $out/share/pixmaps/polymc.svg
|
|
||||||
install -Dm644 ${desktopItem}/share/applications/polymc.desktop $out/share/applications/org.polymc.polymc.desktop
|
|
||||||
|
|
||||||
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
wrapProgram $out/bin/polymc \
|
wrapProgram $out/bin/polymc \
|
||||||
"''${qtWrapperArgs[@]}" \
|
"''${qtWrapperArgs[@]}" \
|
||||||
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr jdk ]}
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user