heroic: patch Desktop Entry StartupWMClass

Heroic usually has a WM Class of "Heroic", however for some reason the
nixpkgs version has a WM Class of "heroic".

This subtle discrepancy results in the app's window not being associated
with its desktop entry, so it cannot be pinned, does not have an icon,
etc.
This commit is contained in:
Matt Sturgeon
2024-12-15 23:01:04 +00:00
parent 5bae96d2c5
commit e47c3d1a02
+1
View File
@@ -87,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
substituteInPlace "$out/share/heroic/flatpak/com.heroicgameslauncher.hgl.desktop" \
--replace-fail "StartupWMClass=Heroic" "StartupWMClass=heroic" \
--replace-fail "Exec=heroic-run" "Exec=heroic"
mkdir -p "$out/share/applications" "$out/share/icons/hicolor/scalable/apps"
ln -s "$out/share/heroic/flatpak/com.heroicgameslauncher.hgl.desktop" "$out/share/applications"