Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 93 lines 1.7 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 stdenv, 5 cmake, 6 boost, 7 ogre_13, 8 mygui, 9 ois, 10 SDL2, 11 libX11, 12 libvorbis, 13 pkg-config, 14 makeWrapper, 15 enet, 16 libXcursor, 17 bullet, 18 openal, 19 tinyxml, 20 tinyxml-2, 21}: 22 23let 24 stuntrally_ogre = ogre_13.overrideAttrs (old: { 25 cmakeFlags = old.cmakeFlags ++ [ 26 "-DOGRE_NODELESS_POSITIONING=ON" 27 "-DOGRE_RESOURCEMANAGER_STRICT=0" 28 ]; 29 }); 30 stuntrally_mygui = mygui.override { 31 withOgre = true; 32 ogre = stuntrally_ogre; 33 }; 34in 35 36stdenv.mkDerivation rec { 37 pname = "stuntrally"; 38 version = "2.7"; 39 40 src = fetchFromGitHub { 41 owner = "stuntrally"; 42 repo = "stuntrally"; 43 rev = version; 44 hash = "sha256-0Eh9ilIHSh/Uz8TuPnXxLQfy7KF7qqNXUgBXQUCz9ys="; 45 }; 46 tracks = fetchFromGitHub { 47 owner = "stuntrally"; 48 repo = "tracks"; 49 rev = version; 50 hash = "sha256-fglm1FetFGHM/qGTtpxDb8+k2iAREn5DQR5GPujuLms="; 51 }; 52 53 postPatch = '' 54 substituteInPlace config/*-default.cfg \ 55 --replace "screenshot_png = off" "screenshot_png = on" 56 substituteInPlace source/*/BaseApp_Create.cpp \ 57 --replace "Codec_FreeImage" "Codec_STBI" 58 ''; 59 60 preConfigure = '' 61 rmdir data/tracks 62 ln -s ${tracks}/ data/tracks 63 ''; 64 65 nativeBuildInputs = [ 66 cmake 67 pkg-config 68 makeWrapper 69 ]; 70 buildInputs = [ 71 boost 72 stuntrally_ogre 73 stuntrally_mygui 74 ois 75 SDL2 76 libX11 77 libvorbis 78 enet 79 libXcursor 80 bullet 81 openal 82 tinyxml 83 tinyxml-2 84 ]; 85 86 meta = with lib; { 87 description = "Stunt Rally game with Track Editor, based on VDrift and OGRE"; 88 homepage = "http://stuntrally.tuxfamily.org/"; 89 license = licenses.gpl3Plus; 90 maintainers = with maintainers; [ pSub ]; 91 platforms = platforms.linux; 92 }; 93}