@@ -1,131 +1,131 @@
11<section xmlns="http://docbook.org/ns/docbook"
22 xmlns:xlink="http://www.w3.org/1999/xlink"
33 xml:id="sec-steam">
4− <title>Steam</title>
4+ <title>Steam</title>
55
6− <section xml:id="sec-steam-nix">
7− <title>Steam in Nix</title>
6+ <section xml:id="sec-steam-nix">
7+ <title>Steam in Nix</title>
88
9− <para>
10− Steam is distributed as a <filename>.deb</filename> file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called <filename>steam</filename> that in Ubuntu (their target distro) would go to <filename>/usr/bin </filename>. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in $HOME.
11− </para>
9+ <para>
10+ Steam is distributed as a <filename>.deb</filename> file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called <filename>steam</filename> that in Ubuntu (their target distro) would go to <filename>/usr/bin </filename>. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in $HOME.
11+ </para>
1212
13− <para>
14− Nix problems and constraints:
15− <itemizedlist>
16− <listitem>
17− <para>
18− We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
19− </para>
20− </listitem>
21− <listitem>
22− <para>
23− We don't have the dynamic loader in <filename>/lib </filename>.
24− </para>
25− </listitem>
26− <listitem>
27− <para>
28− The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
29− </para>
30− </listitem>
31− <listitem>
32− <para>
33− The steam binary cannot be patched, it's also checked.
34− </para>
35− </listitem>
36− </itemizedlist>
37− </para>
13+ <para>
14+ Nix problems and constraints:
15+ <itemizedlist>
16+ <listitem>
17+ <para>
18+ We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
19+ </para>
20+ </listitem>
21+ <listitem>
22+ <para>
23+ We don't have the dynamic loader in <filename>/lib </filename>.
24+ </para>
25+ </listitem>
26+ <listitem>
27+ <para>
28+ The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
29+ </para>
30+ </listitem>
31+ <listitem>
32+ <para>
33+ The steam binary cannot be patched, it's also checked.
34+ </para>
35+ </listitem>
36+ </itemizedlist>
37+ </para>
3838
39− <para>
40− The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented <link xlink:href="http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html">here</link>. This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
41− </para>
42− </section>
39+ <para>
40+ The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented <link xlink:href="http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html">here</link>. This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
41+ </para>
42+ </section>
4343
44− <section xml:id="sec-steam-play">
45− <title>How to play</title>
44+ <section xml:id="sec-steam-play">
45+ <title>How to play</title>
4646
47− <para>
48− For 64-bit systems it's important to have
47+ <para>
48+ For 64-bit systems it's important to have
4949<programlisting>hardware.opengl.driSupport32Bit = true;</programlisting>
50− in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
50+ in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
5151<programlisting>hardware.pulseaudio.support32Bit = true;</programlisting>
52− if you are using PulseAudio - this will enable 32bit ALSA apps integration. To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
52+ if you are using PulseAudio - this will enable 32bit ALSA apps integration. To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
5353<programlisting>hardware.steam-hardware.enable = true;</programlisting>
54− to your configuration.
55− </para>
56− </section>
54+ to your configuration.
55+ </para>
56+ </section>
5757
58− <section xml:id="sec-steam-troub">
59− <title>Troubleshooting</title>
58+ <section xml:id="sec-steam-troub">
59+ <title>Troubleshooting</title>
6060
61− <para>
62− <variablelist>
63− <varlistentry>
64− <term>
65− Steam fails to start. What do I do?
66− </term>
67− <listitem>
68− <para>
69− Try to run
61+ <para>
62+ <variablelist>
63+ <varlistentry>
64+ <term>
65+ Steam fails to start. What do I do?
66+ </term>
67+ <listitem>
68+ <para>
69+ Try to run
7070<programlisting>strace steam</programlisting>
71− to see what is causing steam to fail.
72− </para>
73− </listitem>
74− </varlistentry>
75− <varlistentry>
76− <term>
77− Using the FOSS Radeon or nouveau (nvidia) drivers
78− </term>
79− <listitem>
80− <itemizedlist>
81− <listitem>
82− <para>
83− The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
84− </para>
85− </listitem>
86− <listitem>
87− <para>
88− Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
71+ to see what is causing steam to fail.
72+ </para>
73+ </listitem>
74+ </varlistentry>
75+ <varlistentry>
76+ <term>
77+ Using the FOSS Radeon or nouveau (nvidia) drivers
78+ </term>
79+ <listitem>
80+ <itemizedlist>
81+ <listitem>
82+ <para>
83+ The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
84+ </para>
85+ </listitem>
86+ <listitem>
87+ <para>
88+ Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
8989<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
90− have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
91− </para>
92− </listitem>
93− </itemizedlist>
94− </listitem>
95− </varlistentry>
96− <varlistentry>
97− <term>
98− Java
99− </term>
100− <listitem>
101− <orderedlist>
102− <listitem>
103− <para>
104− There is no java in steam chrootenv by default. If you get a message like
90+ have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
91+ </para>
92+ </listitem>
93+ </itemizedlist>
94+ </listitem>
95+ </varlistentry>
96+ <varlistentry>
97+ <term>
98+ Java
99+ </term>
100+ <listitem>
101+ <orderedlist>
102+ <listitem>
103+ <para>
104+ There is no java in steam chrootenv by default. If you get a message like
105105<programlisting>/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found</programlisting>
106− You need to add
106+ You need to add
107107<programlisting> steam.override { withJava = true; };</programlisting>
108− to your configuration.
109− </para>
110− </listitem>
111− </orderedlist>
112− </listitem>
113− </varlistentry>
114− </variablelist>
115− </para>
116− </section>
108+ to your configuration.
109+ </para>
110+ </listitem>
111+ </orderedlist>
112+ </listitem>
113+ </varlistentry>
114+ </variablelist>
115+ </para>
116+ </section>
117117
118− <section xml:id="sec-steam-run">
119− <title>steam-run</title>
118+ <section xml:id="sec-steam-run">
119+ <title>steam-run</title>
120120
121− <para>
122− The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
121+ <para>
122+ The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
123123<programlisting>pkgs.(steam.override {
124124 nativeOnly = true;
125125 newStdcpp = true;
126126 }).run</programlisting>
127− to your configuration, rebuild, and run the game with
127+ to your configuration, rebuild, and run the game with
128128<programlisting>steam-run ./foo</programlisting>
129− </para>
130− </section>
131−</section>
129+ </para>
130+ </section>
131+</section>