1 { lib, fetchurl, stdenv, runtimeShell, SDL2, freealut, SDL2_image, openal, physfs
2 , zlib, libGLU, libGL, glew, tinyxml-2, copyDesktopItems, makeDesktopItem }:
4 stdenv.mkDerivation rec {
5 pname = "trigger-rally";
9 url = "mirror://sourceforge/trigger-rally/${pname}-${version}.tar.gz";
10 sha256 = "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z";
13 nativeBuildInputs = [ copyDesktopItems ];
29 sed s,/usr/local,$out, -i bin/*defs
33 sed s,lSDL2main,lSDL2, -i GNUmakefile
34 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL2.dev}/include/SDL2"
35 export makeFlags="$makeFlags prefix=$out"
38 enableParallelBuilding = true;
42 cat <<EOF > $out/bin/trigger-rally
44 exec $out/games/trigger-rally "$@"
46 chmod +x $out/bin/trigger-rally
48 mkdir -p $out/share/pixmaps/
49 ln -s $out/share/games/trigger-rally/icon/trigger-rally-icons.svg $out/share/pixmaps/trigger.svg
55 exec = "trigger-rally";
57 desktopName = "Trigger";
58 comment = "Fast-paced 3D single-player rally racing game";
59 categories = [ "Game" "ActionGame" ];
64 description = "Fast-paced single-player racing game";
65 mainProgram = "trigger-rally";
66 homepage = "http://trigger-rally.sourceforge.net/";
67 license = lib.licenses.gpl2Plus;
69 platforms = with lib.platforms; linux;