summary refs log tree commit diff
path: root/pkgs/games/vdrift/default.nix
blob: af112c37af4fb9658911ec44217b3f41082f6ccd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ fetchurl, stdenv, mesa, SDL, scons, freeglut, SDL_image, glew, libvorbis,
  asio, boost, SDL_gfx, pkgconfig, bullet, curl, libarchive }:

stdenv.mkDerivation rec {
  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 = "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 ];

  buildPhase = ''
    sed -i -e s,/usr/local,$out, SConstruct
    scons
  '';
  installPhase = "scons install";

  meta = {
    description = "Car racing game";
    homepage = http://vdrift.net/;
    license = "GPLv2+";
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = stdenv.lib.platforms.linux;
    hydraPlatforms = [];
  };
}