fish-fillets-ng: install desktop file

This commit is contained in:
Ingo Blechschmidt 2020-05-05 11:08:27 +02:00
parent f18ba0425d
commit 289c46d088
2 changed files with 53 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, SDL, lua5_1, pkgconfig, SDL_mixer, SDL_image, SDL_ttf}:
{stdenv, fetchurl, makeDesktopItem, copyDesktopItems, SDL, lua5_1, pkgconfig, SDL_mixer, SDL_image, SDL_ttf}:
stdenv.mkDerivation rec {
pname = "fish-fillets-ng";
version = "1.0.1";
@ -10,11 +10,23 @@ stdenv.mkDerivation rec {
url = "mirror://sourceforge/fillets/fillets-ng-data-${version}.tar.gz";
sha256 = "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh";
};
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig copyDesktopItems ];
buildInputs = [SDL lua5_1 SDL_mixer SDL_image SDL_ttf];
desktopItems = [ (makeDesktopItem {
name = "fish-fillets-ng";
exec = "fillets";
icon = "fish-fillets-ng";
desktopName = "Fish Fillets";
comment = "Puzzle game about witty fish saving the world sokoban-style";
categories = "Game;LogicGame;";
}) ];
postInstall=''
# Install game data
mkdir -p "$out/share/games/fillets-ng/"
tar -xf ${data} -C "$out/share/games/fillets-ng/" --strip-components=1
# Install game icon
install -Dm644 ${./icon.xpm} $out/share/pixmaps/fish-fillets-ng.xpm
'';
meta = {
inherit version;

View file

@ -0,0 +1,39 @@
/* XPM */
static char * fillets_ng_xpm[] = {
"32 32 4 1",
" c None",
". c #000000",
"+ c #808000",
"@ c #FFFF00",
" .......... ",
" ...+@@@@@@+... ",
" ...@@@@@@@@@@@@... ",
" ..+@@@+......+@@@+.. ",
" ..@@@+..........+@@@.. ",
" ..@@@..............@@@.. ",
" ..@@@................@@@.. ",
" ..@@@..................@@@.. ",
" .+@@....................@@+. ",
" ..@@......................@@.. ",
" .@@+......................+@@. ",
"..@@.....@@@@@.........@@...@@..",
".+@+...@@@@@@@@@.....@@@@...+@+.",
".@@...@@@.....@@@...@@+@@....@@.",
".@@...@@.+@....+@@+@@+.@@....@@.",
".@@..@@..@@.....+@@@+..@@....@@.",
".@@..@@.........+@@@+..@@....@@.",
".@@...@@.......+@@+@@+.@@....@@.",
".@@...@@@.....@@@...@@+@@....@@.",
".+@+...@@@@@@@@@.....@@@@...+@+.",
"..@@.....@@@@@.........@@...@@..",
" .@@+......................+@@. ",
" ..@@......................@@.. ",
" .+@@....................@@+. ",
" ..@@@..................@@@.. ",
" ..@@@................@@@.. ",
" ..@@@..............@@@.. ",
" ..@@@+..........+@@@.. ",
" ..+@@@+......+@@@+.. ",
" ...@@@@@@@@@@@@... ",
" ...+@@@@@@+... ",
" .......... "};