speed-dream: add desktop item

This commit is contained in:
Felix Buehler 2024-02-03 16:04:34 +01:00
parent 5af99f7f38
commit e0459db985
1 changed files with 16 additions and 2 deletions

View File

@ -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