2017-02-17 00:25:23 +03:00
|
|
|
{ fetchurl, stdenv, SDL2, freealut, SDL2_image, openal, physfs, zlib, mesa, glew }:
|
2011-03-30 22:45:11 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-02-17 00:25:23 +03:00
|
|
|
name = "trigger-rally-0.6.5";
|
2011-03-30 22:45:11 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-01 12:16:02 +03:00
|
|
|
url = "mirror://sourceforge/trigger-rally/${name}.tar.gz";
|
2017-02-17 00:25:23 +03:00
|
|
|
sha256 = "095s4sx0s1ijlarkh84rvzlv4nxh9llrsal1lb3m3pf0v228gnzj";
|
2011-03-30 22:45:11 +04:00
|
|
|
};
|
|
|
|
|
2017-02-17 00:25:23 +03:00
|
|
|
buildInputs = [ SDL2 freealut SDL2_image openal physfs zlib mesa glew ];
|
2011-03-30 22:45:11 +04:00
|
|
|
|
|
|
|
preConfigure = ''
|
2016-04-01 12:16:02 +03:00
|
|
|
sed s,/usr/local,$out, -i bin/*defs
|
2011-03-30 22:45:11 +04:00
|
|
|
|
2016-04-01 12:16:02 +03:00
|
|
|
cd src
|
2017-02-17 00:25:23 +03:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL2.dev}/include/SDL2"
|
2016-04-01 12:16:02 +03:00
|
|
|
export makeFlags="$makeFlags prefix=$out"
|
2011-03-30 22:45:11 +04:00
|
|
|
'';
|
|
|
|
|
2016-04-01 12:16:02 +03:00
|
|
|
enableParallelBuilding = true;
|
2011-03-30 22:45:11 +04:00
|
|
|
|
2016-04-01 12:16:02 +03:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cat <<EOF > $out/bin/trigger-rally
|
|
|
|
#!/bin/sh
|
|
|
|
exec $out/games/trigger-rally "$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/trigger-rally
|
2011-03-30 22:45:11 +04:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Rally";
|
|
|
|
homepage = http://trigger-rally.sourceforge.net/;
|
2014-06-19 08:19:00 +04:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2011-03-30 22:45:11 +04:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|