2021-01-15 04:31:39 +00:00
|
|
|
{ fetchpatch, fetchurl, lib, stdenv, libGLU, freeglut, libX11, plib, openal, freealut, libXrandr, xorgproto,
|
2012-01-26 08:36:23 +00:00
|
|
|
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, libvorbis,
|
2018-07-21 01:44:44 +01:00
|
|
|
libpng, zlib, makeWrapper }:
|
2010-08-22 15:18:58 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-22 22:44:58 +01:00
|
|
|
pname = "torcs";
|
|
|
|
version = "1.3.7";
|
2010-08-22 15:18:58 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-22 22:44:58 +01:00
|
|
|
url = "mirror://sourceforge/torcs/torcs-${version}.tar.bz2";
|
2016-09-30 12:45:04 +01:00
|
|
|
sha256 = "0kdq0sc7dsfzlr0ggbxggcbkivc6yp30nqwjwcaxg9295s3b06wa";
|
2010-08-22 15:18:58 +01:00
|
|
|
};
|
|
|
|
|
2017-10-22 21:09:19 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2019-04-24 20:26:14 +01:00
|
|
|
url = "https://salsa.debian.org/games-team/torcs/raw/fb0711c171b38c4648dc7c048249ec20f79eb8e2/debian/patches/gcc6-isnan.patch";
|
2017-10-22 21:09:19 +01:00
|
|
|
sha256 = "16scmq30vwb8429ah9d4ws0v1w6ai59lvn7hcgnvfzyap42ry876";
|
|
|
|
})
|
2017-10-22 21:09:46 +01:00
|
|
|
(fetchpatch {
|
2019-04-24 20:26:14 +01:00
|
|
|
url = "https://salsa.debian.org/games-team/torcs/raw/fb0711c171b38c4648dc7c048249ec20f79eb8e2/debian/patches/format-argument.patch";
|
2017-10-22 21:09:46 +01:00
|
|
|
sha256 = "04advcx88yh23ww767iysydzhp370x7cqp2wf9hk2y1qvw7mxsja";
|
|
|
|
})
|
2017-10-22 21:10:49 +01:00
|
|
|
(fetchpatch {
|
2019-04-24 20:26:14 +01:00
|
|
|
url = "https://salsa.debian.org/games-team/torcs/raw/fb0711c171b38c4648dc7c048249ec20f79eb8e2/debian/patches/glibc-default-source.patch";
|
2017-10-22 21:10:49 +01:00
|
|
|
sha256 = "0k4hgpddnhv68mdc9ics7ah8q54j60g394d7zmcmzg6l3bjd9pyp";
|
|
|
|
})
|
2019-04-24 20:26:14 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/games-team/torcs/raw/32bbe77c68b4de07b28c34497f3c0ad666ee618d/debian/patches/gcc7.patch";
|
|
|
|
sha256 = "09iilnvdv8h7b4nb1372arszkbz9hbzsck4rimzz1xjdh9ydniw9";
|
|
|
|
})
|
2017-10-22 21:09:19 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2010-08-22 15:18:58 +01:00
|
|
|
sed -i -e s,/bin/bash,`type -P bash`, src/linux/torcs.in
|
|
|
|
'';
|
|
|
|
|
2019-04-24 20:26:14 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2018-12-31 03:40:47 +00:00
|
|
|
buildInputs = [ libGLU freeglut libX11 plib openal freealut libXrandr xorgproto
|
2019-04-24 20:26:14 +01:00
|
|
|
libXext libSM libICE libXi libXt libXrender libXxf86vm libpng zlib libvorbis ];
|
2012-01-26 08:36:23 +00:00
|
|
|
|
2010-08-22 15:18:58 +01:00
|
|
|
installTargets = "install datainstall";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Car racing game";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://torcs.sourceforge.net/";
|
2021-01-15 04:31:39 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = lib.platforms.linux;
|
2013-11-04 23:04:36 +00:00
|
|
|
hydraPlatforms = [];
|
2010-08-22 15:18:58 +01:00
|
|
|
};
|
|
|
|
}
|