Steam game can't find even though it's in steam-run

I’ve got a native linux game on steam that’s complaining it can’t find

❯ steam-run ~/games/steamapps/common/Loop\ Hero/Loop_Hero
/home/user/games/steamapps/common/Loop Hero/Loop_Hero: error while loading shared libraries: cannot open shared object file: No such file or directory
❯ cd /nix/store && fd | grep steam
❯ nix-shell -p nix-info --run "nix-info"
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.3.10, channels(user): "nixpkgs-21.05pre278688.c0e88185200, nixos-20.09-20.09.2290.647cc06986c", channels(root): "nixos-20.09.3650.dc2870a606a, nixos-unstable-21.05pre279012.ad47284f8b0", nixpkgs: /home/user/.nix-defexpr/channels/nixpkgs

Give n the output of the second command it appears to be available, so I’m not 100% sure what’s going on.

I found this post that seems related, but this game is going through the steam runtime and not proton, and the linked github issue is fixed and my steam is installed from a recent version of nixpkgs unstable, so it would include that fix. Any advice on how I should go about diagnosing this issue?

1 Like

steam-run runs the game in a bwrap with Steam Runtime Scout in the library path. Said runtime only provides OpenSSL 1.0 ABI compatible libraries instead of the OpenSSL 1.1 ABI compatible libraries the game expects.

Try this as a workaround:

NIXPKGS_ALLOW_UNFREE=1 nix-shell -p '(steam.override { extraLibraries = (pkgs: [ pkgs.openssl ]); }).run' --run "steam-run ~/games/steamapps/common/Loop\ Hero/Loop_Hero"

If that works, I’ll see about submitting a pull request to get it into the steam fhsenv derivation.

NIXPKGS_ALLOW_UNFREE=1 nix-shell -p '(steam.override { extraLibraries = (pkgs: [ pkgs.openssl pkgs.nghttp2 pkgs.libidn2 pkgs.rtmpdump pkgs.libpsl pkgs.curl pkgs.krb5 pkgs.keyutils ]); }).run' --command "steam-run~/games/steamapps/common/Loop\ Hero/Loop_Hero"

Appears to be the full list. Using --command instead of --run is needed to allow Loop Hero to find ~/.config/Loop_Hero for saves/config.

There seems to be a PR already in progress for Loop Hero.