Unverified Commit 8f4f5381 authored by Donovan Glover's avatar Donovan Glover
Browse files

srb2kart: add desktop item

parent 731e9507
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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