diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2021-01-14 14:13:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 14:13:01 +0000 |
commit | 195c3acf8f846b9b28f75690062d7a284e754bd4 (patch) | |
tree | 5353c45f4ca875badbb735ccd800325370b4feb8 /pkgs/games | |
parent | f62ab91aa79fcd3ddb367fc8cae249e4f7a4c167 (diff) | |
parent | ffdc3dc13f20dabd7a0fbdd28ae1e5321fd1f149 (diff) |
Merge pull request #86912 from iblech/patch-15
fish-fillets-ng: install desktop file
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/fish-fillets-ng/default.nix | 35 | ||||
-rw-r--r-- | pkgs/games/fish-fillets-ng/icon.xpm | 39 |
2 files changed, 64 insertions, 10 deletions
diff --git a/pkgs/games/fish-fillets-ng/default.nix b/pkgs/games/fish-fillets-ng/default.nix index 638bf59fc781..8870fe21ab9b 100644 --- a/pkgs/games/fish-fillets-ng/default.nix +++ b/pkgs/games/fish-fillets-ng/default.nix @@ -1,7 +1,9 @@ -{stdenv, fetchurl, SDL, lua5_1, pkgconfig, SDL_mixer, SDL_image, SDL_ttf}: +{ lib, stdenv, fetchurl, makeDesktopItem, copyDesktopItems, SDL, lua5_1, pkg-config, SDL_mixer, SDL_image, SDL_ttf }: + stdenv.mkDerivation rec { pname = "fish-fillets-ng"; version = "1.0.1"; + src = fetchurl { url = "mirror://sourceforge/fillets/fillets-ng-${version}.tar.gz"; sha256 = "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij"; @@ -10,18 +12,31 @@ stdenv.mkDerivation rec { url = "mirror://sourceforge/fillets/fillets-ng-data-${version}.tar.gz"; sha256 = "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [SDL lua5_1 SDL_mixer SDL_image SDL_ttf]; - postInstall='' - mkdir -p "$out/share/games/fillets-ng/" - tar -xf ${data} -C "$out/share/games/fillets-ng/" --strip-components=1 + + nativeBuildInputs = [ pkg-config 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 = '' + mkdir -p $out/share/games/fillets-ng + tar -xf ${data} -C $out/share/games/fillets-ng --strip-components=1 + install -Dm644 ${./icon.xpm} $out/share/pixmaps/fish-fillets-ng.xpm ''; - meta = { + + meta = with lib; { inherit version; description = ''A puzzle game''; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; homepage = "http://fillets.sourceforge.net/"; }; } diff --git a/pkgs/games/fish-fillets-ng/icon.xpm b/pkgs/games/fish-fillets-ng/icon.xpm new file mode 100644 index 000000000000..9947c54e7e55 --- /dev/null +++ b/pkgs/games/fish-fillets-ng/icon.xpm @@ -0,0 +1,39 @@ +/* XPM */ +static char * fillets_ng_xpm[] = { +"32 32 4 1", +" c None", +". c #000000", +"+ c #808000", +"@ c #FFFF00", +" .......... ", +" ...+@@@@@@+... ", +" ...@@@@@@@@@@@@... ", +" ..+@@@+......+@@@+.. ", +" ..@@@+..........+@@@.. ", +" ..@@@..............@@@.. ", +" ..@@@................@@@.. ", +" ..@@@..................@@@.. ", +" .+@@....................@@+. ", +" ..@@......................@@.. ", +" .@@+......................+@@. ", +"..@@.....@@@@@.........@@...@@..", +".+@+...@@@@@@@@@.....@@@@...+@+.", +".@@...@@@.....@@@...@@+@@....@@.", +".@@...@@.+@....+@@+@@+.@@....@@.", +".@@..@@..@@.....+@@@+..@@....@@.", +".@@..@@.........+@@@+..@@....@@.", +".@@...@@.......+@@+@@+.@@....@@.", +".@@...@@@.....@@@...@@+@@....@@.", +".+@+...@@@@@@@@@.....@@@@...+@+.", +"..@@.....@@@@@.........@@...@@..", +" .@@+......................+@@. ", +" ..@@......................@@.. ", +" .+@@....................@@+. ", +" ..@@@..................@@@.. ", +" ..@@@................@@@.. ", +" ..@@@..............@@@.. ", +" ..@@@+..........+@@@.. ", +" ..+@@@+......+@@@+.. ", +" ...@@@@@@@@@@@@... ", +" ...+@@@@@@+... ", +" .......... "}; |