1{ fetchurl, stdenv, SDL, freealut, SDL_image, openal, physfs, zlib, mesa, glew }:
2
3stdenv.mkDerivation rec {
4 name = "trigger-rally-0.6.3";
5
6 src = fetchurl {
7 url = "mirror://sourceforge/trigger-rally/${name}.tar.gz";
8 sha256 = "103mv4vpq335mrmgzlhahrfncq7ds3b5ip5a52967rv2j6hhzpvy";
9 };
10
11 buildInputs = [ SDL freealut SDL_image openal physfs zlib mesa glew ];
12
13 preConfigure = ''
14 sed s,/usr/local,$out, -i bin/*defs
15
16 cd src
17 export makeFlags="$makeFlags prefix=$out"
18 '';
19
20 enableParallelBuilding = true;
21
22 postInstall = ''
23 mkdir -p $out/bin
24 cat <<EOF > $out/bin/trigger-rally
25 #!/bin/sh
26 exec $out/games/trigger-rally "$@"
27 EOF
28 chmod +x $out/bin/trigger-rally
29 '';
30
31 # search.patch : fix c++ error.
32 patches = [ ./search.patch ];
33
34 meta = {
35 description = "Rally";
36 homepage = http://trigger-rally.sourceforge.net/;
37 license = stdenv.lib.licenses.gpl2;
38 maintainers = with stdenv.lib.maintainers; [viric];
39 platforms = with stdenv.lib.platforms; linux;
40 };
41}