2021-01-15 04:31:39 +00:00
|
|
|
{ lib, fetchurl, stdenv, runtimeShell, SDL2, freealut, SDL2_image, openal, physfs
|
2024-02-03 15:35:06 +00:00
|
|
|
, zlib, libGLU, libGL, glew, tinyxml-2, copyDesktopItems, makeDesktopItem }:
|
2011-03-30 18:45:11 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-10-13 21:12:09 +00:00
|
|
|
pname = "trigger-rally";
|
|
|
|
version = "0.6.6.1";
|
2011-03-30 18:45:11 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-10-13 21:12:09 +00:00
|
|
|
url = "mirror://sourceforge/trigger-rally/${pname}-${version}.tar.gz";
|
2020-10-13 21:12:09 +00:00
|
|
|
sha256 = "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z";
|
2011-03-30 18:45:11 +00:00
|
|
|
};
|
|
|
|
|
2024-02-03 15:35:06 +00:00
|
|
|
nativeBuildInputs = [ copyDesktopItems ];
|
|
|
|
|
2020-10-13 21:12:09 +00:00
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
freealut
|
|
|
|
SDL2_image
|
|
|
|
openal
|
|
|
|
physfs
|
|
|
|
zlib
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
glew
|
|
|
|
tinyxml-2
|
|
|
|
];
|
2011-03-30 18:45:11 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2016-04-01 09:16:02 +00:00
|
|
|
sed s,/usr/local,$out, -i bin/*defs
|
2011-03-30 18:45:11 +00:00
|
|
|
|
2016-04-01 09:16:02 +00:00
|
|
|
cd src
|
2020-10-13 21:12:09 +00:00
|
|
|
|
|
|
|
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"
|
2011-03-30 18:45:11 +00:00
|
|
|
'';
|
|
|
|
|
2016-04-01 09:16:02 +00:00
|
|
|
enableParallelBuilding = true;
|
2011-03-30 18:45:11 +00:00
|
|
|
|
2016-04-01 09:16:02 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cat <<EOF > $out/bin/trigger-rally
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2016-04-01 09:16:02 +00:00
|
|
|
exec $out/games/trigger-rally "$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/trigger-rally
|
2024-02-03 15:35:06 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/pixmaps/
|
|
|
|
ln -s $out/share/games/trigger-rally/icon/trigger-rally-icons.svg $out/share/pixmaps/trigger.svg
|
2011-03-30 18:45:11 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-03 15:35:06 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "Trigger";
|
|
|
|
exec = "trigger-rally";
|
|
|
|
icon = "trigger";
|
|
|
|
desktopName = "Trigger";
|
|
|
|
comment = "Fast-paced 3D single-player rally racing game";
|
|
|
|
categories = [ "Game" "ActionGame" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2011-03-30 18:45:11 +00:00
|
|
|
meta = {
|
2020-10-13 21:12:09 +00:00
|
|
|
description = "Fast-paced single-player racing game";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "trigger-rally";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://trigger-rally.sourceforge.net/";
|
2024-07-03 09:37:36 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2024-07-28 14:48:51 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 04:31:39 +00:00
|
|
|
platforms = with lib.platforms; linux;
|
2011-03-30 18:45:11 +00:00
|
|
|
};
|
|
|
|
}
|