Author: viric
Date: Mon Feb 13 13:41:57 2012
New Revision: 32257
URL: https://nixos.org/websvn/nix/?rev=32257&sc=1

Log:
I made stuntrally work, thanks to adding the nvidia_cg_toolkit to ogre.

Modified:
   nixpkgs/trunk/pkgs/development/libraries/ogre/default.nix
   nixpkgs/trunk/pkgs/games/stuntrally/default.nix

Modified: nixpkgs/trunk/pkgs/development/libraries/ogre/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/ogre/default.nix   Mon Feb 13 
12:37:35 2012        (r32256)
+++ nixpkgs/trunk/pkgs/development/libraries/ogre/default.nix   Mon Feb 13 
13:41:57 2012        (r32257)
@@ -5,6 +5,7 @@
   , xproto, libX11, libXmu, libSM, pkgconfig
   , libXxf86vm, xf86vidmodeproto, libICE
   , renderproto, libXrender
+  , nvidia_cg_toolkit
   , ...}:
 builderDefsPackage
 (a :  

Modified: nixpkgs/trunk/pkgs/games/stuntrally/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/games/stuntrally/default.nix     Mon Feb 13 12:37:35 
2012        (r32256)
+++ nixpkgs/trunk/pkgs/games/stuntrally/default.nix     Mon Feb 13 13:41:57 
2012        (r32257)
@@ -1,6 +1,5 @@
-{ fetchurl, stdenv, cmake, boost, ogre, myguiSvn, ois, SDL, libvorbis, 
pkgconfig }:
-
-throw "Stunt Rally needs ogre with cg support at runtime - we have to package 
nvidia cg"
+{ fetchurl, stdenv, cmake, boost, ogre, myguiSvn, ois, SDL, libvorbis, 
pkgconfig
+, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "stunt-rally-1.4";
@@ -10,7 +9,14 @@
     sha256 = "1am5af4l1qliyrq1183sqvwzqwcjx0v6gkzsxhfmk6ygp7yhw7kq";
   };
 
-  buildInputs = [ cmake boost ogre myguiSvn ois SDL libvorbis pkgconfig ];
+  buildInputs = [ cmake boost ogre myguiSvn ois SDL libvorbis pkgconfig 
makeWrapper ];
+
+  # I think they suppose cmake should give them OGRE_PLUGIN_DIR defined, but
+  # the cmake code I saw is not ready for that. Therefore, we use the env var.
+  postInstall = ''
+    wrapProgram $out/bin/stuntrally --set OGRE_PLUGIN_DIR ${ogre}/lib/OGRE
+    wrapProgram $out/bin/sr-editor --set OGRE_PLUGIN_DIR ${ogre}/lib/OGRE
+  '';
 
   enableParallelBuilding = true;
 
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to