2021-01-15 05:31:39 +01:00
|
|
|
{ fetchurl, lib, stdenv, libGLU, libGL, freeglut, libX11, plib, openal, freealut, libXrandr, xorgproto,
|
2017-02-26 18:09:51 +01:00
|
|
|
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, openscenegraph, expat,
|
2021-01-17 06:49:22 +01:00
|
|
|
libpng, zlib, bash, SDL2, enet, libjpeg, cmake, pkg-config, libvorbis, runtimeShell, curl }:
|
2011-04-04 07:01:53 +02:00
|
|
|
|
2019-08-06 22:09:31 +02:00
|
|
|
let
|
|
|
|
version = "2.2.2-r6553";
|
|
|
|
shortVersion = builtins.substring 0 5 version;
|
|
|
|
in
|
2011-04-04 07:01:53 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-06 22:09:31 +02:00
|
|
|
inherit version;
|
|
|
|
pname = "speed-dreams";
|
2011-04-04 07:01:53 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-06 22:09:31 +02:00
|
|
|
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-base-${version}.tar.xz";
|
|
|
|
sha256 = "1l47d2619kpfkvdwbkwr311qss6jjfwvgl5h9z2w3bwdgz0mbaij";
|
2011-04-04 07:01:53 +02:00
|
|
|
};
|
|
|
|
|
2017-02-26 18:09:51 +01:00
|
|
|
cars-and-tracks = fetchurl {
|
2019-08-06 22:09:31 +02:00
|
|
|
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-hq-cars-and-tracks-${version}.tar.xz";
|
|
|
|
sha256 = "0l8ba5pzqqcfy4inyxy2lrrhhgfs43xab7fy751xz2xqpqpfksyq";
|
2017-02-26 18:09:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
more-cars-and-tracks = fetchurl {
|
2019-08-06 22:09:31 +02:00
|
|
|
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-more-hq-cars-and-tracks-${version}.tar.xz";
|
|
|
|
sha256 = "10w180mhhk6dw4cza6mqa0hp5qgym9lcizfwykqbgcvs01yl2yqb";
|
2017-02-26 18:09:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
wip-cars-and-tracks = fetchurl {
|
2019-08-06 22:09:31 +02:00
|
|
|
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-wip-cars-and-tracks-${version}.tar.xz";
|
|
|
|
sha256 = "1wad9yaydaryhyi7ckyaii124h0z7kziqgcl475a5jr7ggbxc24q";
|
2017-02-26 18:09:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
echo Unpacking data
|
|
|
|
tar -xf ${cars-and-tracks}
|
|
|
|
tar -xf ${more-cars-and-tracks}
|
|
|
|
tar -xf ${wip-cars-and-tracks}
|
2011-04-04 07:01:53 +02:00
|
|
|
'';
|
|
|
|
|
2017-02-26 18:09:51 +01:00
|
|
|
preBuild = ''
|
|
|
|
make -C src/libs/portability
|
|
|
|
make -C src/libs/portability portability.o
|
|
|
|
ar -rv "$(echo lib*/games/speed-dreams*/lib)"/libportability_static.a src/libs/portability/CMakeFiles/portability.dir/portability.cpp.o
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L$(echo $PWD/lib*/games/speed-dreams*/lib) -lexpat"
|
|
|
|
echo "libportability_static.a built"
|
|
|
|
'';
|
2011-04-04 07:01:53 +02:00
|
|
|
|
2017-02-26 18:09:51 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir "$out/bin"
|
|
|
|
for i in "$out"/games/*; do
|
2019-02-26 12:45:54 +01:00
|
|
|
echo '#!${runtimeShell}' >> "$out/bin/$(basename "$i")"
|
2017-02-26 18:09:51 +01:00
|
|
|
echo "$i"' "$@"' >> "$out/bin/$(basename "$i")"
|
|
|
|
chmod a+x "$out/bin/$(basename "$i")"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-17 06:49:22 +01:00
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
2011-04-04 07:01:53 +02:00
|
|
|
|
2019-11-10 17:44:34 +01:00
|
|
|
buildInputs = [ libpng libGLU libGL freeglut libX11 plib openal freealut libXrandr xorgproto
|
2017-02-26 18:09:51 +01:00
|
|
|
libXext libSM libICE libXi libXt libXrender libXxf86vm zlib bash expat
|
2019-08-06 22:09:31 +02:00
|
|
|
SDL2 enet libjpeg openscenegraph libvorbis curl ];
|
2011-04-04 07:01:53 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Car racing game - TORCS fork with more experimental approach";
|
2019-08-06 22:09:31 +02:00
|
|
|
homepage = "http://speed-dreams.sourceforge.net/";
|
2021-01-15 05:31:39 +01:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2013-11-05 00:04:36 +01:00
|
|
|
hydraPlatforms = [];
|
2011-04-04 07:01:53 +02:00
|
|
|
};
|
|
|
|
}
|