1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/games/torcs/default.nix
rushmorem d332b914ce torcs: 1.3.5 -> 1.3.7
This change also wraps `torcs` with `mesa` to fix the runtime
crush due to this dependancy which was missing.
2016-09-30 13:58:13 +02:00

40 lines
1.1 KiB
Nix

{ fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto,
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, libvorbis,
libpng, zlib, bash, makeWrapper }:
stdenv.mkDerivation rec {
name = "torcs-1.3.7";
src = fetchurl {
url = "mirror://sourceforge/torcs/${name}.tar.bz2";
sha256 = "0kdq0sc7dsfzlr0ggbxggcbkivc6yp30nqwjwcaxg9295s3b06wa";
};
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 makeWrapper ];
nativeBuildInputs = [ bash ];
installTargets = "install datainstall";
hardeningDisable = [ "format" ];
postInstall = ''
wrapProgram $out/bin/torcs \
--prefix LD_LIBRARY_PATH : ${mesa}/lib
'';
meta = {
description = "Car racing game";
homepage = http://torcs.sourceforge.net/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = stdenv.lib.platforms.linux;
hydraPlatforms = [];
};
}