18 url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data";
20 sha256 = "sha256-KEu49GAOfenPyuaUItt6W9pkuqUNpXgmTSFuc7ThljQ=";
24 version = "unstable-2021-09-05";
25 bin = stdenv.mkDerivation {
29 src = fetchFromGitHub {
32 rev = "7e9e00c8612b2014d491f026dd86b03f9fb04dcd";
33 sha256 = "sha256-DrzRF4WzwEXCNALq0jz8nHWZ1oYTEsdrvSYVYI1WkTI=";
36 nativeBuildInputs = [ pkg-config scons ];
37 buildInputs = [ libGLU libGL SDL2 SDL2_image libvorbis bullet curl gettext ];
40 ./0001-Ignore-missing-data-for-installation.patch
44 sed -i -e s,/usr/local,$out, SConstruct
45 export CXXFLAGS="$(pkg-config --cflags SDL2_image)"
46 scons -j$NIX_BUILD_CORES
48 installPhase = "scons install";
51 description = "Car racing game";
52 homepage = "http://vdrift.net/";
53 license = lib.licenses.gpl2Plus;
54 maintainers = with lib.maintainers; [ viric ];
55 platforms = lib.platforms.linux;
58 wrappedName = "vdrift-${version}-with-data-${toString data.rev}";
60 (writeShellScriptBin "vdrift" ''
61 export VDRIFT_DATA_DIRECTORY="${data}"
62 exec ${bin}/bin/vdrift "$@"
63 '').overrideAttrs (_: {