2011-04-08 15:26:10 +02:00
|
|
|
{ fetchsvn, fetchurl, stdenv, wxGTK290, freeimage, cmake, zziplib, mesa, boost,
|
2011-04-08 13:28:49 +02:00
|
|
|
pkgconfig, libuuid, lua5, openal, ogre, ois, curl, gtk, pixman, mygui, unzip,
|
|
|
|
angelscript
|
|
|
|
}:
|
2011-03-31 00:08:33 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-04-08 13:28:49 +02:00
|
|
|
/* version = "1780"; */
|
|
|
|
version = "0.37";
|
|
|
|
name = "rigsofrods-${version}";
|
2011-03-31 00:08:33 +02:00
|
|
|
|
2011-04-08 13:28:49 +02:00
|
|
|
/* src = fetchsvn {
|
2011-03-31 00:08:33 +02:00
|
|
|
url = https://rigsofrods.svn.sourceforge.net/svnroot/rigsofrods/trunk;
|
|
|
|
rev = version;
|
2011-04-08 13:28:49 +02:00
|
|
|
}; */
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = mirror://sourceforge/rigsofrods/rigsofrods/0.37-dev/RoR-0.37.126-Sources.zip;
|
|
|
|
sha256 = "03mxmxpfdlsri0j3nqgyj2pc4gpzs8zq8qgg6qhnyazi7j95j4mk";
|
2011-03-31 00:08:33 +02:00
|
|
|
};
|
|
|
|
|
2011-04-09 17:51:24 +02:00
|
|
|
contentPackSrc = fetchurl {
|
|
|
|
url = mirror://sourceforge/rigsofrods/rigsofrods/0.37/content-pack-0.37.zip;
|
|
|
|
sha256 = "0prvn8lxqazadad4mv0nilax9i4vqb9s7dp7mqzvqc0ycmcnf4ps";
|
|
|
|
};
|
|
|
|
|
2011-03-31 00:08:33 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DROR_USE_LUA=TRUE" "-DLUA_LIBRARIES=${lua5}/lib/liblua.a"
|
|
|
|
"-DROR_USE_CURL=TRUE"
|
|
|
|
"-DROR_USE_MYGUI=TRUE"
|
|
|
|
# "-DROR_USE_OPNEAL=TRUE"
|
|
|
|
# "-DROR_USE_MOFILEREADER=TRUE"
|
|
|
|
# "-DROR_USE_CAELUM=TRUE"
|
|
|
|
# "-DROR_USE_PAGED=TRUE"
|
2011-04-09 17:51:24 +02:00
|
|
|
"-DROR_USE_ANGELSCRIPT=TRUE"
|
2011-03-31 00:08:33 +02:00
|
|
|
# "-DROR_USE_SOCKETW=TRUE"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
2011-04-08 13:28:49 +02:00
|
|
|
sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../bin/plugins.cfg
|
|
|
|
sed -e "/CgProgramManager/d" -i ../bin/plugins.cfg
|
|
|
|
ensureDir $out/share/rigsofrods
|
|
|
|
cp -r .. $out/share/rigsofrods/build-dir
|
2011-03-31 00:08:33 +02:00
|
|
|
ensureDir $out/bin
|
2011-04-08 13:28:49 +02:00
|
|
|
for i in RoR rorconfig RoRViewer; do
|
|
|
|
echo '#! ${stdenv.shell}' >> "$out/bin/$i"
|
2011-04-08 15:26:10 +02:00
|
|
|
if [ "$i" = "rorconfig" ]; then
|
|
|
|
echo "[ -d \"\$HOME/.rigsofrods\" ] && cp -r '$out/share/rigsofrods/build-dirs/bin/skeleton' \"\$HOME/.rigsofrods\"" >> "$out/bin/$i"
|
|
|
|
echo "chmod u+w -R \"\$HOME/.rigsofrods\"" >> "$out/bin/$i"
|
|
|
|
fi
|
2011-04-08 13:28:49 +02:00
|
|
|
echo "\"$out/share/rigsofrods/build-dir/bin/$i\"" >> "$out/bin/$i"
|
|
|
|
chmod a+x "$out/bin/$i"
|
|
|
|
done
|
2011-04-09 17:51:24 +02:00
|
|
|
cd $out/share/rigsofrods/build-dir/bin/
|
|
|
|
unzip "${contentPackSrc}"
|
2011-03-31 00:08:33 +02:00
|
|
|
'';
|
|
|
|
|
2011-04-08 13:28:49 +02:00
|
|
|
preConfigure = ''
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -langelscript -lgtk-x11-2.0"
|
|
|
|
sed -e 's@wxLOCALE_CONV_ENCODING@0@g' -i source/configurator/configurator.cpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
# patches = [ ./wx.patch ];
|
2011-03-31 00:08:33 +02:00
|
|
|
|
2011-04-08 15:26:10 +02:00
|
|
|
buildInputs = [ wxGTK290 freeimage cmake zziplib mesa boost pkgconfig
|
2011-04-08 13:28:49 +02:00
|
|
|
libuuid lua5 openal ogre ois curl gtk mygui unzip angelscript ];
|
2011-03-31 00:08:33 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "3D simulator game where you can drive, fly and sail various vehicles";
|
|
|
|
homepage = http://rigsofrods.sourceforge.net/;
|
|
|
|
license = "GPLv3";
|
2011-04-08 16:11:54 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric raskin];
|
2011-03-31 00:08:33 +02:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|