1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/pkgs/games/trigger/default.nix
Robert Helgesson 72f455362c
trigger-rally: fix build
Previously failed due to not finding `SDL.h`.
2016-09-03 11:29:59 +02:00

43 lines
1.1 KiB
Nix

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