From bb9b3d0db567c94f05f8c69fc9777ad6eca845f2 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 3 Feb 2024 16:35:06 +0100 Subject: [PATCH] trigger: add desktop item --- pkgs/games/trigger/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/games/trigger/default.nix b/pkgs/games/trigger/default.nix index cb3227f24e3e..57bc75d53820 100644 --- a/pkgs/games/trigger/default.nix +++ b/pkgs/games/trigger/default.nix @@ -1,5 +1,5 @@ { lib, fetchurl, stdenv, runtimeShell, SDL2, freealut, SDL2_image, openal, physfs -, zlib, libGLU, libGL, glew, tinyxml-2 }: +, zlib, libGLU, libGL, glew, tinyxml-2, copyDesktopItems, makeDesktopItem }: stdenv.mkDerivation rec { pname = "trigger-rally"; @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { sha256 = "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z"; }; + nativeBuildInputs = [ copyDesktopItems ]; + buildInputs = [ SDL2 freealut @@ -42,8 +44,22 @@ stdenv.mkDerivation rec { exec $out/games/trigger-rally "$@" EOF chmod +x $out/bin/trigger-rally + + mkdir -p $out/share/pixmaps/ + ln -s $out/share/games/trigger-rally/icon/trigger-rally-icons.svg $out/share/pixmaps/trigger.svg ''; + desktopItems = [ + (makeDesktopItem { + name = "Trigger"; + exec = "trigger-rally"; + icon = "trigger"; + desktopName = "Trigger"; + comment = "Fast-paced 3D single-player rally racing game"; + categories = [ "Game" "ActionGame" ]; + }) + ]; + meta = { description = "A fast-paced single-player racing game"; homepage = "http://trigger-rally.sourceforge.net/";