From 910a79f06d5ddf2aed455c8a6d622fcbee3eb114 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 8 Apr 2011 11:28:49 +0000 Subject: [PATCH] Switching to release tarball, adding angelscript dependency, fixing name, adding link options.. All in all, rorconfig fails because of a weird windowing-related error. svn path=/nixpkgs/trunk/; revision=26752 --- pkgs/games/rigsofrods/default.nix | 40 +++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/pkgs/games/rigsofrods/default.nix b/pkgs/games/rigsofrods/default.nix index 5a619f6c6c2..caa54573cf2 100644 --- a/pkgs/games/rigsofrods/default.nix +++ b/pkgs/games/rigsofrods/default.nix @@ -1,14 +1,21 @@ -{ fetchsvn, stdenv, wxGTK28, freeimage, cmake, zziplib, mesa, boost, pkgconfig, - libuuid, lua5, openal, ogre, ois, curl, gtk, pixman, mygui }: +{ fetchsvn, fetchurl, stdenv, wxGTK29, freeimage, cmake, zziplib, mesa, boost, + pkgconfig, libuuid, lua5, openal, ogre, ois, curl, gtk, pixman, mygui, unzip, + angelscript + }: stdenv.mkDerivation rec { - version = "1780"; - name = "rigsofroads-svn-${version}"; + /* version = "1780"; */ + version = "0.37"; + name = "rigsofrods-${version}"; - src = fetchsvn { + /* src = fetchsvn { url = https://rigsofrods.svn.sourceforge.net/svnroot/rigsofrods/trunk; rev = version; - sha256 = "1i557jc79jpg79kg0gk5a7zsd2m42x89v9q83kzywrzzp1x5imp3"; + }; */ + + src = fetchurl { + url = mirror://sourceforge/rigsofrods/rigsofrods/0.37-dev/RoR-0.37.126-Sources.zip; + sha256 = "03mxmxpfdlsri0j3nqgyj2pc4gpzs8zq8qgg6qhnyazi7j95j4mk"; }; enableParallelBuilding = true; @@ -26,14 +33,27 @@ stdenv.mkDerivation rec { ]; installPhase = '' + 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 ensureDir $out/bin - cp ../bin/RoR ../bin/rorconfig $out/bin + for i in RoR rorconfig RoRViewer; do + echo '#! ${stdenv.shell}' >> "$out/bin/$i" + echo "\"$out/share/rigsofrods/build-dir/bin/$i\"" >> "$out/bin/$i" + chmod a+x "$out/bin/$i" + done ''; - patches = [ ./wx.patch ]; + preConfigure = '' + export NIX_LDFLAGS="$NIX_LDFLAGS -langelscript -lgtk-x11-2.0" + sed -e 's@wxLOCALE_CONV_ENCODING@0@g' -i source/configurator/configurator.cpp + ''; - buildInputs = [ wxGTK28 freeimage cmake zziplib mesa boost pkgconfig - libuuid lua5 openal ogre ois curl gtk mygui ]; + # patches = [ ./wx.patch ]; + + buildInputs = [ wxGTK29 freeimage cmake zziplib mesa boost pkgconfig + libuuid lua5 openal ogre ois curl gtk mygui unzip angelscript ]; meta = { description = "3D simulator game where you can drive, fly and sail various vehicles";