diff options
author | Chris Rendle-Short <chris@killred.net> | 2019-04-21 13:41:29 +1000 |
---|---|---|
committer | Chris Rendle-Short <chris@killred.net> | 2019-04-22 21:52:52 +1000 |
commit | 328b1d3cd52d844ae1b172f3014ecc3e40f07b9f (patch) | |
tree | be6a84260eb1d15031cc6ab64ecf7b5834fcecaa /pkgs | |
parent | 4b201f6c5797ed44f0fc044c1fcc21d949c87199 (diff) |
hyperrogue: add .desktop file and icon
Add XDG .desktop file and icons.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/games/hyperrogue/default.nix | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/pkgs/games/hyperrogue/default.nix b/pkgs/games/hyperrogue/default.nix index 8c32e164afa1f..760d82c026d23 100644 --- a/pkgs/games/hyperrogue/default.nix +++ b/pkgs/games/hyperrogue/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, SDL, SDL_ttf, SDL_gfx, SDL_mixer, autoreconfHook, - libpng, glew }: + libpng, glew, makeDesktopItem }: stdenv.mkDerivation rec { name = "hyperrogue-${version}"; @@ -16,6 +16,33 @@ stdenv.mkDerivation rec { buildInputs = [ autoreconfHook SDL SDL_ttf SDL_gfx SDL_mixer libpng glew ]; + desktopItem = makeDesktopItem { + name = "hyperrogue"; + desktopName = "HyperRogue"; + genericName = "HyperRogue"; + comment = meta.description; + icon = "hyperrogue"; + exec = "hyperrogue"; + categories = "Game;AdventureGame;"; + }; + + postInstall = '' + install -m 444 -D ${desktopItem}/share/applications/hyperrogue.desktop \ + $out/share/applications/hyperrogue.desktop + install -m 444 -D hyperroid/app/src/main/res/drawable-ldpi/icon.png \ + $out/share/icons/hicolor/36x36/apps/hyperrogue.png + install -m 444 -D hyperroid/app/src/main/res/drawable-mdpi/icon.png \ + $out/share/icons/hicolor/48x48/apps/hyperrogue.png + install -m 444 -D hyperroid/app/src/main/res/drawable-hdpi/icon.png \ + $out/share/icons/hicolor/72x72/apps/hyperrogue.png + install -m 444 -D hyperroid/app/src/main/res/drawable-xhdpi/icon.png \ + $out/share/icons/hicolor/96x96/apps/hyperrogue.png + install -m 444 -D hyperroid/app/src/main/res/drawable-xxhdpi/icon.png \ + $out/share/icons/hicolor/144x144/apps/hyperrogue.png + install -m 444 -D hyperroid/app/src/main/res/drawable-xxxhdpi/icon.png \ + $out/share/icons/hicolor/192x192/apps/hyperrogue.png + ''; + enableParallelBuilding = true; meta = with stdenv.lib; { |