summary refs log tree commit diff
path: root/pkgs/games/fish-fillets-ng/default.nix
blob: 9b5ee627394f1e4505eb1271ab828b2865e850d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{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";
  src = fetchurl {
    url = "mirror://sourceforge/fillets/fillets-ng-${version}.tar.gz";
    sha256 = "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij";
  };
  data = fetchurl {
    url = "mirror://sourceforge/fillets/fillets-ng-data-${version}.tar.gz";
    sha256 = "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh";
  };
  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;
    description = ''A puzzle game'';
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = [stdenv.lib.maintainers.raskin];
    platforms = stdenv.lib.platforms.linux;
    homepage = "http://fillets.sourceforge.net/";
  };
}