nixpkgs/pkgs/games/trigger/default.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv, SDL2, freealut, SDL2_image, openal, physfs, zlib, libGLU_combined, glew }:
stdenv.mkDerivation rec {
2017-02-16 21:25:23 +00:00
name = "trigger-rally-0.6.5";
src = fetchurl {
2016-04-01 09:16:02 +00:00
url = "mirror://sourceforge/trigger-rally/${name}.tar.gz";
2017-02-16 21:25:23 +00:00
sha256 = "095s4sx0s1ijlarkh84rvzlv4nxh9llrsal1lb3m3pf0v228gnzj";
};
buildInputs = [ SDL2 freealut SDL2_image openal physfs zlib libGLU_combined glew ];
preConfigure = ''
2016-04-01 09:16:02 +00:00
sed s,/usr/local,$out, -i bin/*defs
2016-04-01 09:16:02 +00:00
cd src
2017-02-16 21:25:23 +00:00
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL2.dev}/include/SDL2"
2016-04-01 09:16:02 +00:00
export makeFlags="$makeFlags prefix=$out"
'';
2016-04-01 09:16:02 +00:00
enableParallelBuilding = true;
2016-04-01 09:16:02 +00: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
'';
meta = {
description = "Rally";
homepage = http://trigger-rally.sourceforge.net/;
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}