1 { fetchpatch, fetchurl, lib, stdenv, libGLU, libglut, libX11, plib, openal, freealut, libXrandr, xorgproto,
2 libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, libvorbis,
3 libpng, zlib, makeWrapper }:
5 stdenv.mkDerivation rec {
10 url = "mirror://sourceforge/torcs/torcs-${version}.tar.bz2";
11 sha256 = "0kdq0sc7dsfzlr0ggbxggcbkivc6yp30nqwjwcaxg9295s3b06wa";
16 url = "https://salsa.debian.org/games-team/torcs/raw/fb0711c171b38c4648dc7c048249ec20f79eb8e2/debian/patches/gcc6-isnan.patch";
17 sha256 = "16scmq30vwb8429ah9d4ws0v1w6ai59lvn7hcgnvfzyap42ry876";
20 url = "https://salsa.debian.org/games-team/torcs/raw/fb0711c171b38c4648dc7c048249ec20f79eb8e2/debian/patches/format-argument.patch";
21 sha256 = "04advcx88yh23ww767iysydzhp370x7cqp2wf9hk2y1qvw7mxsja";
24 url = "https://salsa.debian.org/games-team/torcs/raw/fb0711c171b38c4648dc7c048249ec20f79eb8e2/debian/patches/glibc-default-source.patch";
25 sha256 = "0k4hgpddnhv68mdc9ics7ah8q54j60g394d7zmcmzg6l3bjd9pyp";
28 url = "https://salsa.debian.org/games-team/torcs/raw/32bbe77c68b4de07b28c34497f3c0ad666ee618d/debian/patches/gcc7.patch";
29 sha256 = "09iilnvdv8h7b4nb1372arszkbz9hbzsck4rimzz1xjdh9ydniw9";
34 install -D -m644 Ticon.png $out/share/pixmaps/torcs.png
35 install -D -m644 torcs.desktop $out/share/applications/torcs.desktop
39 sed -i -e s,/bin/bash,`type -P bash`, src/linux/torcs.in
42 nativeBuildInputs = [ makeWrapper ];
43 buildInputs = [ libGLU libglut libX11 plib openal freealut libXrandr xorgproto
44 libXext libSM libICE libXi libXt libXrender libXxf86vm libpng zlib libvorbis ];
46 installTargets = "install datainstall";
49 description = "Car racing game";
50 homepage = "https://torcs.sourceforge.net/";
51 license = lib.licenses.gpl2Plus;
53 platforms = lib.platforms.linux;