srb2kart: add desktop item

This commit is contained in:
Donovan Glover 2024-03-16 06:09:48 -04:00
parent 731e950709
commit 8f4f53815c
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -11,6 +11,8 @@
, SDL2_mixer
, zlib
, makeWrapper
, makeDesktopItem
, copyDesktopItems
}:
stdenv.mkDerivation (finalAttrs: {
@ -48,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
cmake
nasm
makeWrapper
copyDesktopItems
];
buildInputs = [
@ -66,6 +69,19 @@ stdenv.mkDerivation (finalAttrs: {
"-DSDL2_INCLUDE_DIR=${lib.getDev SDL2}/include/SDL2"
];
desktopItems = [
(makeDesktopItem rec {
name = "Sonic Robo Blast 2 Kart";
exec = finalAttrs.pname;
icon = finalAttrs.pname;
comment = "Kart racing mod based on SRB2";
desktopName = name;
genericName = name;
startupWMClass = ".srb2kart-wrapped";
categories = [ "Game" ];
})
];
installPhase = ''
runHook preInstall