diff --git a/pkgs/games/speed-dreams/default.nix b/pkgs/games/speed-dreams/default.nix index d32edc7d182a..bdfc68f837d1 100644 --- a/pkgs/games/speed-dreams/default.nix +++ b/pkgs/games/speed-dreams/default.nix @@ -1,6 +1,6 @@ { 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, SDL2_mixer, 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.3.0-r8786"; @@ -54,12 +54,26 @@ 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