nixpkgs/pkgs/games/trigger/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-15 04:31:39 +00:00
{ lib, fetchurl, stdenv, runtimeShell, SDL2, freealut, SDL2_image, openal, physfs
, zlib, libGLU, libGL, glew, tinyxml-2 }:
stdenv.mkDerivation rec {
2020-10-13 21:12:09 +00:00
pname = "trigger-rally";
version = "0.6.6.1";
src = fetchurl {
2020-10-13 21:12:09 +00:00
url = "mirror://sourceforge/trigger-rally/${pname}-${version}.tar.gz";
sha256 = "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z";
};
2020-10-13 21:12:09 +00:00
buildInputs = [
SDL2
freealut
SDL2_image
openal
physfs
zlib
libGLU
libGL
glew
tinyxml-2
];
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
sed s,lSDL2main,lSDL2, -i GNUmakefile
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
#!${runtimeShell}
2016-04-01 09:16:02 +00:00
exec $out/games/trigger-rally "$@"
EOF
chmod +x $out/bin/trigger-rally
'';
meta = {
description = "A fast-paced single-player racing game";
homepage = "http://trigger-rally.sourceforge.net/";
2021-01-15 04:31:39 +00:00
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [viric];
platforms = with lib.platforms; linux;
};
}