summary refs log tree commit diff
path: root/pkgs/games/r2modman/steam-launch-fix.patch
diff options
context:
space:
mode:
authorAidan Gauland <aidalgol@fastmail.net>2023-09-12 17:00:52 +1200
committerAidan Gauland <aidalgol@fastmail.net>2023-09-12 17:15:45 +1200
commit363e9382a54b0cc2eec27638a7534adaaf063951 (patch)
treeb2266cb2b49bfb0be226aeadfec6479e2996bc74 /pkgs/games/r2modman/steam-launch-fix.patch
parent461aa2d82fc8196ab979b560ead321d84593bcd2 (diff)
downloadnixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.tar
nixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.tar.gz
nixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.tar.bz2
nixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.tar.lz
nixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.tar.xz
nixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.tar.zst
nixpkgs-363e9382a54b0cc2eec27638a7534adaaf063951.zip
r2modman: fix launching Steam games
Patch r2modman to run "steam" instead of trying to directly run
"steam.sh" from the user's home directory.  This means it uses the NixOS
wrapper script, which runs Steam in the necessary FHS environment.

Fixes #240369
Diffstat (limited to 'pkgs/games/r2modman/steam-launch-fix.patch')
-rw-r--r--pkgs/games/r2modman/steam-launch-fix.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/games/r2modman/steam-launch-fix.patch b/pkgs/games/r2modman/steam-launch-fix.patch
new file mode 100644
index 00000000000..4a52c8fdb35
--- /dev/null
+++ b/pkgs/games/r2modman/steam-launch-fix.patch
@@ -0,0 +1,21 @@
+diff --git a/src/r2mm/launching/runners/linux/SteamGameRunner_Linux.ts b/src/r2mm/launching/runners/linux/SteamGameRunner_Linux.ts
+index ddee0e9..fc9ffca 100644
+--- a/src/r2mm/launching/runners/linux/SteamGameRunner_Linux.ts
++++ b/src/r2mm/launching/runners/linux/SteamGameRunner_Linux.ts
+@@ -61,15 +61,9 @@ export default class SteamGameRunner_Linux extends GameRunnerProvider {
+     async start(game: Game, args: string): Promise<void | R2Error> {
+ 
+         const settings = await ManagerSettings.getSingleton(game);
+-        const steamDir = await GameDirectoryResolverProvider.instance.getSteamDirectory();
+-        if(steamDir instanceof R2Error) {
+-            return steamDir;
+-        }
+-
+-        LoggerProvider.instance.Log(LogSeverity.INFO, `Steam directory is: ${steamDir}`);
+ 
+         try {
+-            const cmd = `"${steamDir}/steam.sh" -applaunch ${game.activePlatform.storeIdentifier} ${args} ${settings.getContext().gameSpecific.launchParameters}`;
++            const cmd = `steam -applaunch ${game.activePlatform.storeIdentifier} ${args} ${settings.getContext().gameSpecific.launchParameters}`;
+             LoggerProvider.instance.Log(LogSeverity.INFO, `Running command: ${cmd}`);
+             await exec(cmd);
+         } catch(err) {