about summary refs log tree commit diff
path: root/pkgs/games/steam
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-03-12 03:37:01 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-03-15 04:55:48 +0100
commit5f0b5bba153b2169c7ca4e5bcaafdabbe2cb6d8a (patch)
treeabd04cc68750d4a63795a2b73265637e3c1d07da /pkgs/games/steam
parent291e3b31567d9e28e6a29a17065861e479f896f9 (diff)
games/starbound: Add desktop item
Makes it easier for DE users not used to a terminal to start the game.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/games/steam')
-rw-r--r--pkgs/games/steam/starbound.nix20
1 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/games/steam/starbound.nix b/pkgs/games/steam/starbound.nix
index 17ba7ea7..631bd8ef 100644
--- a/pkgs/games/steam/starbound.nix
+++ b/pkgs/games/steam/starbound.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchSteam, writeText, SDL, mesa, jq, flavor ? "stable" }:
+{ stdenv, fetchSteam, fetchurl, writeText, SDL, mesa, jq, makeDesktopItem
+, flavor ? "stable"
+}:
 
 let
   renameAttrs = f: let
@@ -104,6 +106,20 @@ let
     chmod +x "$out/bin/${attrs.name or basename}"
   '';
 
+  desktopItem = makeDesktopItem {
+    name = "starbound";
+    exec = "starbound";
+    icon = fetchurl {
+      url = "http://i1305.photobucket.com/albums/s544/ClockworkBarber/"
+          + "logo_zps64c4860d.png";
+      sha256 = "11fiiy0vcxzix1j81732cjh16wi48k4vag040vmbhad50ps3mg0q";
+    };
+    comment = "An extraterrestrial sandbox adventure game";
+    desktopName = "Starbound";
+    genericName = "starbound";
+    categories = "Game;";
+  };
+
 in stdenv.mkDerivation {
   name = "${upstreamInfo.name}-${upstreamInfo.version}";
   inherit (upstreamInfo) version;
@@ -144,6 +160,8 @@ in stdenv.mkDerivation {
   installPhase = ''
     mkdir -p "$out/bin"
     ${stdenv.lib.concatStrings (stdenv.lib.mapAttrsToList mkProg binaryDeps)}
+    install -m 0644 -vD "${desktopItem}/share/applications/starbound.desktop" \
+      "$out/share/applications/starbound.desktop"
   '';
 
   dontStrip = true;