1{ fetchsvn, fetchurl, stdenv, wxGTK29, freeimage, cmake, zziplib, mesa, boost,
2 pkgconfig, libuuid, openal, ogre, ois, curl, gtk, pixman, mygui, unzip,
3 angelscript, caelum, ogrepaged, mysocketw, libxcb
4 }:
5
6stdenv.mkDerivation rec {
7 version = "0.39.4";
8 name = "rigsofrods-${version}";
9
10 src = fetchurl {
11 url = mirror://sourceforge/rigsofrods/rigsofrods-source-0.39.4.tar.bz2;
12 sha256 = "1kpjkski0yllwzdki0rjpqvifjs0fwpgs513y4dv4s9wfwan1qcx";
13 };
14
15 contentPackSrc = fetchurl {
16 url = mirror://sourceforge/rigsofrods/rigsofrods/0.37/content-pack-0.37.zip;
17 sha256 = "0prvn8lxqazadad4mv0nilax9i4vqb9s7dp7mqzvqc0ycmcnf4ps";
18 };
19
20 enableParallelBuilding = true;
21
22 cmakeFlags = [
23 "-DROR_USE_CURL=TRUE"
24 "-DROR_USE_MYGUI=TRUE"
25 "-DROR_USE_OPNEAL=TRUE"
26 "-DROR_USE_CAELUM=TRUE"
27 "-DROR_USE_PAGED=TRUE"
28 "-DROR_USE_ANGELSCRIPT=TRUE"
29 "-DROR_USE_SOCKETW=TRUE"
30 "-DCMAKE_BUILD_TYPE=Release"
31 ];
32
33 installPhase = ''
34 sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../tools/linux/binaries/plugins.cfg
35 mkdir -p $out/share/rigsofrods
36 cp -r ../bin/* $out/share/rigsofrods
37 cp ../tools/linux/binaries/plugins.cfg $out/share/rigsofrods
38 mkdir -p $out/bin
39 ln -s $out/share/rigsofrods/{RoR,rorconfig} $out/bin
40 cd $out/share/rigsofrods
41 mkdir packs
42 cd packs
43 unzip "${contentPackSrc}"
44 '';
45
46 patches = [ ./doubleslash.patch ./paths.patch ];
47
48 buildInputs = [ wxGTK29 freeimage cmake zziplib mesa boost pkgconfig
49 libuuid openal ogre ois curl gtk mygui unzip angelscript
50 caelum ogrepaged mysocketw libxcb ];
51
52 meta = {
53 description = "3D simulator game where you can drive, fly and sail various vehicles";
54 homepage = http://rigsofrods.sourceforge.net/;
55 license = stdenv.lib.licenses.gpl3;
56 maintainers = with stdenv.lib.maintainers; [viric raskin];
57 platforms = stdenv.lib.platforms.linux;
58 hydraPlatforms = [];
59 };
60}