Unverified Commit 38479bdd authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #288348 from Stunkymonkey/trigger-rally-desktop-item

trigger: add desktop item
parents 5e012036 bb9b3d0d
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
{ 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/";