2016-04-17 04:24:26 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchsvn, pkgconfig, scons, mesa, SDL2, SDL2_image, libvorbis,
|
|
|
|
bullet, curl, gettext }:
|
2011-03-28 18:08:21 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-12-26 11:07:28 +01:00
|
|
|
version = "git";
|
2013-03-09 14:54:43 +01:00
|
|
|
name = "vdrift-${version}";
|
2011-03-28 18:08:21 +02:00
|
|
|
|
2016-04-17 04:24:26 +02:00
|
|
|
src = fetchFromGitHub {
|
2017-12-26 11:07:28 +01:00
|
|
|
owner = "vdrift";
|
2016-04-17 04:24:26 +02:00
|
|
|
repo = "vdrift";
|
2017-12-26 11:07:28 +01:00
|
|
|
rev = "12d444ed18395be8827a21b96cc7974252fce6d1";
|
|
|
|
sha256 = "001wq3c4n9wzxqfpq40b1jcl16sxbqv2zbkpy9rq2wf9h417q6hg";
|
2011-03-28 18:08:21 +02:00
|
|
|
};
|
|
|
|
|
2016-04-17 04:24:26 +02:00
|
|
|
data = fetchsvn {
|
|
|
|
url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data";
|
|
|
|
rev = 1386;
|
|
|
|
sha256 = "0ka6zir9hg0md5p03dl461jkvbk05ywyw233hnc3ka6shz3vazi1";
|
2013-03-09 14:54:43 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ scons mesa SDL2 SDL2_image libvorbis bullet curl gettext ];
|
2011-03-28 18:08:21 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
2016-04-17 04:24:26 +02:00
|
|
|
cp -r --reflink=auto $data data
|
|
|
|
chmod -R +w data
|
2011-03-28 18:08:21 +02:00
|
|
|
sed -i -e s,/usr/local,$out, SConstruct
|
2017-06-13 21:51:33 +02:00
|
|
|
export CXXFLAGS="$(pkg-config --cflags SDL2_image)"
|
2017-12-26 11:07:28 +01:00
|
|
|
scons -j$NIX_BUILD_CORES
|
2011-03-28 18:08:21 +02:00
|
|
|
'';
|
|
|
|
installPhase = "scons install";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Car racing game";
|
|
|
|
homepage = http://vdrift.net/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2017-12-26 11:11:49 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric lheckemann];
|
2013-11-05 00:04:36 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2011-03-28 18:08:21 +02:00
|
|
|
};
|
|
|
|
}
|