Merge pull request #287524 from Stunkymonkey/speed-dreams-desktop-item

speed-dreams: 2.2.3 -> 2.3.0; add desktop item
This commit is contained in:
Pol Dellaiera 2024-02-12 19:59:58 +01:00 committed by GitHub
commit 692356d156
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,9 @@
{ fetchurl, lib, stdenv, libGLU, libGL, freeglut, libX11, plib, openal, freealut, libXrandr, xorgproto,
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, openscenegraph, expat,
libpng, zlib, bash, SDL2, enet, libjpeg, cmake, pkg-config, libvorbis, runtimeShell, curl }:
libpng, zlib, bash, SDL2, SDL2_mixer, enet, libjpeg, cmake, pkg-config, libvorbis, runtimeShell, curl, copyDesktopItems, makeDesktopItem }:
let
version = "2.2.3-r7616";
version = "2.3.0-r8786";
shortVersion = builtins.substring 0 5 version;
in
stdenv.mkDerivation rec {
@ -12,22 +12,22 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-base-${version}.tar.xz";
sha256 = "sha256-GvB8SDZB9UivJSsQfMMon9N5MURdxTOwsaN4F0XQUCE=";
sha256 = "sha256-DUyMs9Hr1PYgmNVwBY/e6snVeGl9GX0AnZ7S+TFABKQ=";
};
cars-and-tracks = fetchurl {
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-hq-cars-and-tracks-${version}.tar.xz";
sha256 = "sha256-BuryCUvBD7rKmApCNsTkRN0UJ1q6P3sdYrSzpTqdTHc=";
sha256 = "sha256-WT+W6uuw4BRSbF1Cw123q3v9qSCvBQ7TcQ/Y0RV/7Js=";
};
more-cars-and-tracks = fetchurl {
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-more-hq-cars-and-tracks-${version}.tar.xz";
sha256 = "sha256-GSCHYbJS352yAMczzss7tYSQXwLQV68rv/XkyGy+GoY=";
sha256 = "sha256-psApv+Z1HDFvh5bzt125mo/ZvO5rjee/KhOf45iKnKk=";
};
wip-cars-and-tracks = fetchurl {
url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-wip-cars-and-tracks-${version}.tar.xz";
sha256 = "sha256-r/IOSf+UZg2e+WIHn2QNDO6qQUhpIJvh7EF2jQ7lyyA=";
sha256 = "sha256-OEAbqFfO2PzHP7+eAtPNn3Ql6fYNTKzzQW8lHe9KDXM=";
};
sourceRoot = ".";
@ -54,16 +54,30 @@ stdenv.mkDerivation rec {
echo "$i"' "$@"' >> "$out/bin/$(basename "$i")"
chmod a+x "$out/bin/$(basename "$i")"
done
mkdir -p $out/share/pixmaps/
ln -s "$out/share/games/speed-dreams-2/data/icons/icon.png" "$out/share/pixmaps/speed-dreams-2.png"
'';
desktopItems = [
(makeDesktopItem {
name = "Speed Dreams 2";
exec = "speed-dreams-2";
icon = "speed-dreams-2.png";
desktopName = "speed-dreams-2";
comment = "The Open Racing Car Simulator Fork";
categories = [ "Application" "Game" ];
})
];
# RPATH of binary /nix/store/.../lib64/games/speed-dreams-2/drivers/shadow_sc/shadow_sc.so contains a forbidden reference to /build/
cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ];
nativeBuildInputs = [ pkg-config cmake ];
nativeBuildInputs = [ pkg-config cmake copyDesktopItems ];
buildInputs = [ libpng libGLU libGL freeglut libX11 plib openal freealut libXrandr xorgproto
libXext libSM libICE libXi libXt libXrender libXxf86vm zlib bash expat
SDL2 enet libjpeg openscenegraph libvorbis curl ];
SDL2 SDL2_mixer enet libjpeg openscenegraph libvorbis curl ];
meta = {
description = "Car racing game - TORCS fork with more experimental approach";