From 03ba2960a44a23a5683ceac3bea30bf724792594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 9 Mar 2013 14:54:43 +0100 Subject: [PATCH] vdrift: update and fix Tested on two laps :-) --- pkgs/development/libraries/bullet/default.nix | 19 +++++++++++-------- pkgs/games/vdrift/default.nix | 12 ++++++++++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix index b725f6bbf9fe..6320dd58e4c6 100644 --- a/pkgs/development/libraries/bullet/default.nix +++ b/pkgs/development/libraries/bullet/default.nix @@ -1,14 +1,17 @@ -{stdenv, fetchurl, unzip, cmake}: +{ stdenv, fetchurl, cmake, mesa, freeglut }: -stdenv.mkDerivation { - name = "bullet-2.78"; +stdenv.mkDerivation rec { + name = "bullet-2.80"; # vdrift 2012-07-22 doesn't build with 2.81 + rev = "2531"; src = fetchurl { - url = "http://bullet.googlecode.com/files/bullet-2.78.zip"; - sha256 = "10l2dclvv0di9mi9qp6xfy9vybx182xp2dyygabacrpr3p75s77k"; + url = "http://bullet.googlecode.com/files/${name}-rev${rev}.tgz"; + sha256 = "0dig6k88jz5y0cz6dn186vc4l96l4v56zvwpsp5bv9f5wdwjskj6"; }; - buildInputs = [ unzip cmake ]; + + buildInputs = [ cmake mesa freeglut ]; configurePhase = '' - cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF . + cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF \ + -DCMAKE_INSTALL_PREFIX=$out . ''; meta = { @@ -19,6 +22,6 @@ stdenv.mkDerivation { ''; homepage = http://code.google.com/p/bullet/; license = stdenv.lib.licenses.zlib; - maintainers = [ "Alexander Foremny " ]; + maintainers = with stdenv.lib.maintainers; [ aforemny ]; }; } diff --git a/pkgs/games/vdrift/default.nix b/pkgs/games/vdrift/default.nix index 0f9da8883827..63a8f5086845 100644 --- a/pkgs/games/vdrift/default.nix +++ b/pkgs/games/vdrift/default.nix @@ -2,13 +2,21 @@ asio, boost, SDL_gfx, pkgconfig, bullet, curl, libarchive }: stdenv.mkDerivation rec { - name = "vdrift-2011-10-22"; + version = "2012-07-22"; + name = "vdrift-${version}"; + patch = "c"; # see https://github.com/VDrift/vdrift/issues/110 src = fetchurl { url = "mirror://sourceforge/vdrift/${name}.tar.bz2"; - sha256 = "0vg1v1590jbln6k236kxn2sfgclvc6g34kykhh4nq9q3l1xgy38s"; + sha256 = "1yqkc7y4s4g5ylw501bf0c03la7kfddjdk4yyi1xkcwy3pmgw2al"; }; + patches = fetchurl { + url = "mirror://sourceforge/vdrift/${name}${patch}_patch.diff"; + sha256 = "08mfg4xxkzyp6602cgqyjzc3rn0zsaa3ddjkpd44b83drv19lriy"; + }; + patchFlags = "-p0"; + buildInputs = [ scons mesa SDL freeglut SDL_image glew libvorbis asio boost SDL_gfx pkgconfig bullet curl libarchive ];