Editing registry keys in a Proton prefix?

I’m trying to get the new Halo 3: Project Reclaimer mod up and running on my PC, which already has Halo: MCC installed and working properly, and I came across this guide and script to get it running on an Ubuntu machine.

Part of the setup involves adding some registry keys to a Proton prefix, but the script provided in the guide obviously doesn’t work on a non-FHS distro like NixOS:

export WINEPREFIX="$HOME/.steam/steam/steamapps/compatdata/976730/pfx"
WINE="$HOME/.steam/steam/steamapps/common/Proton - Experimental/files/bin/wine"
STEAMWIN="Z:${HOME//\//\\}\\.steam\\steam"   # e.g. Z:\home\you\.steam\steam

"$WINE" reg add 'HKCU\Software\Valve\Steam'              /v SteamPath    /t REG_SZ /d "$STEAMWIN" /f
"$WINE" reg add 'HKLM\Software\Valve\Steam'              /v InstallPath  /t REG_SZ /d "$STEAMWIN" /f
"$WINE" reg add 'HKLM\Software\WOW6432Node\Valve\Steam'  /v InstallPath  /t REG_SZ /d "$STEAMWIN" /f

Attempting to run this anyway results in the “Could not start dynamically linked executable” error, which makes sense.

Is there a NixOS-friendly way to make this happen? I’ve looked a little bit in the nix.dev FAQ about nix-ld, but I’m not sure how or if I could apply that to what I’m trying to do here.

Probably you can just use steam-run to get into the FHS environment that Steam uses:

Thank you! This seems to work for adding the registry keys to the Proton prefix. Just did a steam-run on each reg add command, and it seems to have been successful.

I’m hung up on the next step in the process now, though. Trying to run the launch script as follows:

export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/steam"
export STEAM_COMPAT_DATA_PATH="$HOME/.steam/steam/steamapps/compatdata/976730"
export STEAM_COMPAT_APP_ID=976730

steam-run "$HOME/.steam/steam/steamapps/common/Proton - Experimental/proton" run \
  "$HOME/Games/ProjectReclaimer/project-reclaimer-client-v0.9.18.exe"

Yields only this, no game running as expected: ntsync: up and running.

Kinda wondering if this is currently a dead end for NixOS? Not really sure where to go from here, but I appreciate the help thus far!

Omfg, I’m a moron. The latest version of the game Just Works™ if you add it to Steam as a non-Steam game and use the same version of Proton as your Halo: MCC install.

Sorry for unnecessary questions, but thanks again!