Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
94 lines
1.8 KiB
Nix
94 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
fetchurl,
|
|
stdenv,
|
|
runtimeShell,
|
|
SDL2,
|
|
freealut,
|
|
SDL2_image,
|
|
openal,
|
|
physfs,
|
|
zlib,
|
|
libGLU,
|
|
libGL,
|
|
glew,
|
|
tinyxml-2,
|
|
copyDesktopItems,
|
|
makeDesktopItem,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "trigger-rally";
|
|
version = "0.6.6.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/trigger-rally/${pname}-${version}.tar.gz";
|
|
sha256 = "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z";
|
|
};
|
|
|
|
nativeBuildInputs = [ copyDesktopItems ];
|
|
|
|
buildInputs = [
|
|
SDL2
|
|
freealut
|
|
SDL2_image
|
|
openal
|
|
physfs
|
|
zlib
|
|
libGLU
|
|
libGL
|
|
glew
|
|
tinyxml-2
|
|
];
|
|
|
|
preConfigure = ''
|
|
sed s,/usr/local,$out, -i bin/*defs
|
|
|
|
cd src
|
|
|
|
sed s,lSDL2main,lSDL2, -i GNUmakefile
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getInclude SDL2}/include/SDL2"
|
|
'';
|
|
|
|
makeFlags = [
|
|
"prefix=${placeholder "out"}"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/bin
|
|
cat <<EOF > $out/bin/trigger-rally
|
|
#!${runtimeShell}
|
|
exec $out/games/trigger-rally "$@"
|
|
EOF
|
|
chmod +x $out/bin/trigger-rally
|
|
|
|
mkdir -p $out/share/pixmaps/
|
|
ln -s $out/share/games/trigger-rally/icon/trigger-rally-icons.svg $out/share/pixmaps/trigger.svg
|
|
'';
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "Trigger";
|
|
exec = "trigger-rally";
|
|
icon = "trigger";
|
|
desktopName = "Trigger";
|
|
comment = "Fast-paced 3D single-player rally racing game";
|
|
categories = [
|
|
"Game"
|
|
"ActionGame"
|
|
];
|
|
})
|
|
];
|
|
|
|
meta = {
|
|
description = "Fast-paced single-player racing game";
|
|
mainProgram = "trigger-rally";
|
|
homepage = "http://trigger-rally.sourceforge.net/";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ ];
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
}
|