diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2017-02-26 18:09:51 +0100 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2017-02-26 18:10:36 +0100 |
commit | a872e222807f11b1ec47d3289eca5bc39953525c (patch) | |
tree | 446f7876467fdd49503d40e5172ef1d9751d930b /pkgs/games | |
parent | 1d9fa60df014129629eb3b0661d566af10ee09ae (diff) |
speed_dreams: 2.0.0-a3 -> 2.2.1
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/speed-dreams/default.nix | 61 |
1 files changed, 47 insertions, 14 deletions
diff --git a/pkgs/games/speed-dreams/default.nix b/pkgs/games/speed-dreams/default.nix index e6105eab95b9..cb7a345900af 100644 --- a/pkgs/games/speed-dreams/default.nix +++ b/pkgs/games/speed-dreams/default.nix @@ -1,29 +1,62 @@ { fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto, -libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, -libpng, zlib, bash, p7zip, SDL, enet, libjpeg, cmake}: +libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, openscenegraph, expat, +libpng, zlib, bash, SDL2, enet, libjpeg, cmake, pkgconfig, libvorbis}: stdenv.mkDerivation rec { - version = "2.0.0-a3-r3412"; + version = "2.2.1-r6404"; name = "speed-dreams-${version}"; src = fetchurl { - url = "mirror://sourceforge/speed-dreams/2.0.0/${name}-src.tar.7z"; - sha256 = "0hn5fgn90wmd1xha1la133harx47qc647f4zj8hfdvd7wb3kpjab"; + url = "mirror://sourceforge/speed-dreams/2.2.1/speed-dreams-src-base-${version}.tar.xz"; + sha256 = "0347sk8xbdsyvl48qybbycd7hvzsx5b37zzjx1yx73nzddhmlpbx"; }; - unpackPhase = '' - 7z e -so ${src} | tar -x - cd */ + cars-and-tracks = fetchurl { + url = "mirror://sourceforge/speed-dreams/2.2.1/speed-dreams-src-hq-cars-and-tracks-${version}.tar.xz"; + sha256 = "1h50l110n42nrq6j3kcyhi3swgmrjcg979vb6h0zsf46afwv0z3q"; + }; + + more-cars-and-tracks = fetchurl { + url = "mirror://sourceforge/speed-dreams/2.2.1/speed-dreams-src-more-hq-cars-and-tracks-${version}.tar.xz"; + sha256 = "03m3gwd03jqgsfjdglzmrv613cp4gh50i63fwmnwl282zhxydcwd"; + }; + + wip-cars-and-tracks = fetchurl { + url = "mirror://sourceforge/speed-dreams/2.2.1/speed-dreams-src-wip-cars-and-tracks-${version}.tar.xz"; + sha256 = "0ysk756rd294xzpwvmjh0mb229ngzrc4ry9lpyhyak98rbcp9hxm"; + }; + + sourceRoot = "."; + + postUnpack = '' + echo Unpacking data + tar -xf ${cars-and-tracks} + tar -xf ${more-cars-and-tracks} + tar -xf ${wip-cars-and-tracks} ''; - # Order important; it wants libpng12 and some x libs propagate libpng15 - buildInputs = [ libpng mesa freeglut libX11 plib openal freealut libXrandr xproto - libXext libSM libICE libXi libXt libXrender libXxf86vm zlib bash - p7zip SDL enet libjpeg cmake ]; + 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" + ''; - installTargets = "install"; + postInstall = '' + mkdir "$out/bin" + for i in "$out"/games/*; do + echo '#!${stdenv.shell}' >> "$out/bin/$(basename "$i")" + echo "$i"' "$@"' >> "$out/bin/$(basename "$i")" + chmod a+x "$out/bin/$(basename "$i")" + done + ''; + + nativeBuildInputs = [ pkgconfig cmake ]; - dontUseCmakeBuildDir=true; + buildInputs = [ libpng mesa freeglut libX11 plib openal freealut libXrandr xproto + libXext libSM libICE libXi libXt libXrender libXxf86vm zlib bash expat + SDL2 enet libjpeg openscenegraph libvorbis ]; meta = { description = "Car racing game - TORCS fork with more experimental approach"; |