From e035fb4cac229809867be5e27d1d89f1578bb868 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 4 Apr 2011 05:01:53 +0000 Subject: [PATCH] Adding Speed Dreams (a TORCS fork) svn path=/nixpkgs/trunk/; revision=26673 --- pkgs/games/speed-dreams/default.nix | 34 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/games/speed-dreams/default.nix diff --git a/pkgs/games/speed-dreams/default.nix b/pkgs/games/speed-dreams/default.nix new file mode 100644 index 000000000000..2a6b239608fd --- /dev/null +++ b/pkgs/games/speed-dreams/default.nix @@ -0,0 +1,34 @@ +{ fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto, +libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, +libpng, zlib, bash, p7zip, SDL, enet, libjpeg, cmake}: + +stdenv.mkDerivation rec { + version = "2.0.0-a3-r3412"; + name = "speed-dreams-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/speed-dreams/2.0.0/${name}-src.tar.7z"; + sha256 = "0hn5fgn90wmd1xha1la133harx47qc647f4zj8hfdvd7wb3kpjab"; + }; + + unpackPhase = '' + 7z e -so ${src} | tar -x + cd */ + ''; + + buildInputs = [ mesa freeglut libX11 plib openal freealut libXrandr xproto + libXext libSM libICE libXi libXt libXrender libXxf86vm libpng zlib bash + p7zip SDL enet libjpeg cmake]; + + installTargets = "install"; + + dontUseCmakeBuildDir=true; + + meta = { + description = "Car racing game - TORCS fork with more experimental approach"; + homepage = http://speed-dreams.sourceforge.net/; + license = "GPLv2+"; + maintainers = with stdenv.lib.maintainers; [viric raskin]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 72c63e4946a8..f2491f309e05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7276,6 +7276,12 @@ let tremulous = callPackage ../games/tremulous { }; + speed_dreams = callPackage ../games/speed-dreams { + # 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; }; + }; + 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