summary refs log tree commit diff
path: root/pkgs/games/torcs/default.nix
blob: f5b713ae3373dc1d454155c1a61dde74d2f10103 (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
{ fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto,
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, libvorbis,
libpng, zlib, bash }:

stdenv.mkDerivation rec {
  name = "torcs-1.3.2";

  src = fetchurl {
    url = "mirror://sourceforge/torcs/${name}.tar.bz2";
    sha256 = "0171ixhnd9cs8jkwa5awrxklfgyykcbc9m8270b8cw30lsx7qhp1";
  };

  patchPhase = ''
    sed -i -e s,/bin/bash,`type -P bash`, src/linux/torcs.in
  '';

  buildInputs = [ mesa freeglut libX11 plib openal freealut libXrandr xproto
    libXext libSM libICE libXi libXt libXrender libXxf86vm libpng zlib libvorbis ];

  nativeBuildInputs = [ bash ];

  installTargets = "install datainstall";

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