From 5f0b5bba153b2169c7ca4e5bcaafdabbe2cb6d8a Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 12 Mar 2016 03:37:01 +0100 Subject: games/starbound: Add desktop item Makes it easier for DE users not used to a terminal to start the game. Signed-off-by: aszlig --- pkgs/games/steam/starbound.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'pkgs/games/steam') 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; -- cgit 1.4.1