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