summary refs log tree commit diff
path: root/pkgs/games/maelstrom/default.nix
blob: 5f78e34edac97549bb29d179ed48e1b133344e84 (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
{ lib, stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_net }:

stdenv.mkDerivation rec {
  pname = "maelstrom";
  version = "3.0.7";

  src = fetchurl {
    url = "http://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${version}.tar.gz";
    sha256 = "0dm0m5wd7amrsa8wnrblkv34sq4v4lglc2wfx8klfkdhyhi06s4k";
  };

  # this fixes a typedef compilation error with gcc-3.x
  patches = [ ./fix-compilation.patch ];

  buildInputs = [ SDL2 SDL2_net ];

  postInstall = ''
    mkdir -p $out/bin
    ln -s $out/games/Maelstrom/Maelstrom $out/bin/maelstrom
  '';

  desktopItems = [
    (makeDesktopItem {
      name = "maelstrom";
      exec = "maelstrom";
      desktopName = "Maelstrom";
      genericName = "Maelstrom";
      comment = "An arcade-style game resembling Asteroids";
      categories = "Game;";
    })
  ];

  meta = with lib; {
    description = "An arcade-style game resembling Asteroids";
    license = licenses.gpl2Plus;
    platforms = platforms.all;
    maintainers = with maintainers; [ tmountain ];
  };
}