nixpkgs/pkgs/games/trigger/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2016-04-01 12:16:02 +03:00
{ fetchurl, stdenv, SDL, freealut, SDL_image, openal, physfs, zlib, mesa, glew }:
stdenv.mkDerivation rec {
2016-04-01 12:16:02 +03:00
name = "trigger-rally-0.6.3";
src = fetchurl {
2016-04-01 12:16:02 +03:00
url = "mirror://sourceforge/trigger-rally/${name}.tar.gz";
sha256 = "103mv4vpq335mrmgzlhahrfncq7ds3b5ip5a52967rv2j6hhzpvy";
};
2016-04-01 12:16:02 +03:00
buildInputs = [ SDL freealut SDL_image openal physfs zlib mesa glew ];
preConfigure = ''
2016-04-01 12:16:02 +03:00
sed s,/usr/local,$out, -i bin/*defs
2016-04-01 12:16:02 +03:00
cd src
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL"
2016-04-01 12:16:02 +03:00
export makeFlags="$makeFlags prefix=$out"
'';
2016-04-01 12:16:02 +03:00
enableParallelBuilding = true;
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
'';
2016-04-01 12:16:02 +03:00
# search.patch : fix c++ error.
patches = [ ./search.patch ];
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;
};
}