diff --git a/pkgs/games/heroic/default.nix b/pkgs/games/heroic/default.nix index 6ebd911ccdc3..05455ae7c7d6 100644 --- a/pkgs/games/heroic/default.nix +++ b/pkgs/games/heroic/default.nix @@ -42,6 +42,8 @@ in stdenv.mkDerivation rec { # Reverts part of upstream PR 2761 so that we don't have to use a non-free Electron fork. # https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/2761 ./remove-drm-support.patch + # Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic. + ./fix-non-steam-shortcuts.patch ]; configurePhase = '' diff --git a/pkgs/games/heroic/fix-non-steam-shortcuts.patch b/pkgs/games/heroic/fix-non-steam-shortcuts.patch new file mode 100644 index 000000000000..7b46473245f7 --- /dev/null +++ b/pkgs/games/heroic/fix-non-steam-shortcuts.patch @@ -0,0 +1,13 @@ +diff --git a/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts b/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts +index ebef6aa4..c8bd853d 100644 +--- a/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts ++++ b/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts +@@ -252,7 +252,7 @@ async function addNonSteamGame(props: { + // add new Entry + const newEntry = {} as ShortcutEntry + newEntry.AppName = props.gameInfo.title +- newEntry.Exe = `"${app.getPath('exe')}"` ++ newEntry.Exe = `"heroic"` + newEntry.StartDir = `"${process.cwd()}"` + + if (isFlatpak) {