lol
at 24.11-pre 71 lines 1.8 kB view raw
1{ lib, fetchurl, stdenv, runtimeShell, SDL2, freealut, SDL2_image, openal, physfs 2, zlib, libGLU, libGL, glew, tinyxml-2, copyDesktopItems, makeDesktopItem }: 3 4stdenv.mkDerivation rec { 5 pname = "trigger-rally"; 6 version = "0.6.6.1"; 7 8 src = fetchurl { 9 url = "mirror://sourceforge/trigger-rally/${pname}-${version}.tar.gz"; 10 sha256 = "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z"; 11 }; 12 13 nativeBuildInputs = [ copyDesktopItems ]; 14 15 buildInputs = [ 16 SDL2 17 freealut 18 SDL2_image 19 openal 20 physfs 21 zlib 22 libGLU 23 libGL 24 glew 25 tinyxml-2 26 ]; 27 28 preConfigure = '' 29 sed s,/usr/local,$out, -i bin/*defs 30 31 cd src 32 33 sed s,lSDL2main,lSDL2, -i GNUmakefile 34 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL2.dev}/include/SDL2" 35 export makeFlags="$makeFlags prefix=$out" 36 ''; 37 38 enableParallelBuilding = true; 39 40 postInstall = '' 41 mkdir -p $out/bin 42 cat <<EOF > $out/bin/trigger-rally 43 #!${runtimeShell} 44 exec $out/games/trigger-rally "$@" 45 EOF 46 chmod +x $out/bin/trigger-rally 47 48 mkdir -p $out/share/pixmaps/ 49 ln -s $out/share/games/trigger-rally/icon/trigger-rally-icons.svg $out/share/pixmaps/trigger.svg 50 ''; 51 52 desktopItems = [ 53 (makeDesktopItem { 54 name = "Trigger"; 55 exec = "trigger-rally"; 56 icon = "trigger"; 57 desktopName = "Trigger"; 58 comment = "Fast-paced 3D single-player rally racing game"; 59 categories = [ "Game" "ActionGame" ]; 60 }) 61 ]; 62 63 meta = { 64 description = "A fast-paced single-player racing game"; 65 mainProgram = "trigger-rally"; 66 homepage = "http://trigger-rally.sourceforge.net/"; 67 license = lib.licenses.gpl2; 68 maintainers = with lib.maintainers; [viric]; 69 platforms = with lib.platforms; linux; 70 }; 71}