Steam: Difference between revisions
imported>Fadenb No edit summary |
imported>Fadenb m Syntax highlighting |
||
Line 3: | Line 3: | ||
== I want to play == | == I want to play == | ||
For 64-bit systems it's important to have < | For 64-bit systems it's important to have <syntaxhighlight lang="nix" inline>hardware.opengl.driSupport32Bit = true</syntaxhighlight> in your NixOS configuration. You'll also need <syntaxhighlight lang="nix" inline>hardware.pulseaudio.support32Bit = true</syntaxhighlight> if you are using PulseAudio - this will enable 32bit ALSA apps integration. | ||
== Master/Unstable branch == | == Master/Unstable branch == | ||
Line 10: | Line 10: | ||
== Stable branch == | == Stable branch == | ||
Install "steam" and "steamChrootEnv" packages. Run: | Install "steam" and "steamChrootEnv" packages. Run: | ||
<syntaxhighlight lang="bash"> | |||
sudo init-steam-chrootenv | |||
sudo mount-steam-chrootenv | |||
load-steam-chrootenv | |||
steam | |||
</syntaxhighlight> | |||
To destroy the chroot env, run: | To destroy the chroot env, run: | ||
<syntaxhighlight lang="bash"> | |||
sudo umount-steam-chrootenv | |||
sudo destroy-steam-chrootenv | |||
</syntaxhighlight> | |||
== Description of the package == | == Description of the package == | ||
Line 53: | Line 57: | ||
=== But what about the games? === | === But what about the games? === | ||
You can install any of the games normally, but they will fail to start. From this step on, you're in the unsupported realm. Some games can be patchelfed: | You can install any of the games normally, but they will fail to start. From this step on, you're in the unsupported realm. Some games can be patchelfed: | ||
<syntaxhighlight lang="bash"> | |||
patchelf --set-interpreter /path/to/ld.so game_binary (you can get the path to an x86 ld.so looking at the steam script in the store, for me /nix/store/xh0q23rgqbjfrh3zfv4jyxvcvjnxqh64-glibc-2.15.0/lib/ld-linux.so.2) | |||
</syntaxhighlight> | |||
You might also need patching some scripts. That all depends on each one. You can then press play from steam and if you're lucky that'll be it! | You might also need patching some scripts. That all depends on each one. You can then press play from steam and if you're lucky that'll be it! | ||
Line 68: | Line 74: | ||
* Add a file named steam_appid.txt in the binary folder, with the appid as contents (it can be found in the stdout from steam) | * Add a file named steam_appid.txt in the binary folder, with the appid as contents (it can be found in the stdout from steam) | ||
* Using the LD_LIBRARY_PATH from the nix/store steam script, with some additions, launch the game binary | * Using the LD_LIBRARY_PATH from the nix/store steam script, with some additions, launch the game binary | ||
<syntaxhighlight lang="bash"> | |||
LD_LIBRARY_PATH=~/.steam/bin32:$LD_LIBRARY_PATH:/nix/store/pfsa... blabla ...curl-7.29.0/lib:. ./Osmos.bin32 (if you could not patchelf the game, call ld.so directly with the binary as param) | LD_LIBRARY_PATH=~/.steam/bin32:$LD_LIBRARY_PATH:/nix/store/pfsa... blabla ...curl-7.29.0/lib:. ./Osmos.bin32 (if you could not patchelf the game, call ld.so directly with the binary as param) | ||
</syntaxhighlight> | |||
With this technique, I can play many games directly from steam. Others, like Team Fortress, cannot be patched so I only managed to run them from the cmd line. | With this technique, I can play many games directly from steam. Others, like Team Fortress, cannot be patched so I only managed to run them from the cmd line. | ||
=== Using the FOSS Radeon drivers === | === Using the FOSS Radeon drivers === | ||
The open source radeon drivers need a newer libc++ than is provided by the default runtime, which leads to acrash on launch. Use | The open source radeon drivers need a newer libc++ than is provided by the default runtime, which leads to acrash on launch. Use | ||
<syntaxhighlight lang="nix"> | |||
(steamPackages.override { newLibcpp = true; }).steam-chrootenv | |||
</syntaxhighlight> | |||
[https://github.com/NixOS/nixpkgs/pull/12404 in your config] if you get an error like | [https://github.com/NixOS/nixpkgs/pull/12404 in your config] if you get an error like | ||
Line 85: | Line 94: | ||
=== Known issues === | === Known issues === | ||
# No java in steam chrootenv. Games affected: Towns: | # No java in steam chrootenv. Games affected: Towns: | ||
<syntaxhighlight lang="console"> | |||
/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found | |||
</syntaxhighlight> |