Adding torcs

svn path=/nixpkgs/trunk/; revision=23354
This commit is contained in:
Lluís Batlle i Rossell 2010-08-22 14:18:58 +00:00
parent 397a10aba2
commit 53b8411c7a
3 changed files with 39 additions and 1 deletions

View file

@ -1,5 +1,6 @@
{ fetchurl, stdenv, mesa, freeglut, SDL
, libXi, libSM, libXmu, libXext, libX11 }:
, libXi, libSM, libXmu, libXext, libX11,
enablePIC ? false }:
stdenv.mkDerivation rec {
name = "plib-1.8.5";
@ -10,6 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8";
};
NIX_CFLAGS_COMPILE = if (enablePIC) then "-fPIC" else "";
propagatedBuildInputs = [
mesa freeglut SDL

View file

@ -0,0 +1,29 @@
{ fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto,
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm,
libpng, zlib, bash }:
stdenv.mkDerivation rec {
name = "torcs-1.3.1";
src = fetchurl {
url = "mirror://sourceforge/torcs/${name}.tar.bz2";
sha256 = "1zai7nrx93pcv24r3fkr08831szj7vz3a6xy8fihlv6wvfnpn6wh";
};
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 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;
};
}

View file

@ -6507,6 +6507,12 @@ let
tremulous = callPackage ../games/tremulous { };
torcs = callPackage ../games/torcs {
# Torcs wants to make shared libraries linked with plib libraries (it provides static).
# i686 is the only platform I know than can do that linking without plib built with -fPIC
plib = plib.override { enablePIC = if stdenv.isi686 then false else true; };
};
ultimatestunts = callPackage ../games/ultimatestunts { };
urbanterror = callPackage ../games/urbanterror { };