summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Mulligan <ryan@ryantm.com>2020-12-22 20:42:23 -0800
committerGitHub <noreply@github.com>2020-12-22 20:42:23 -0800
commitb7eef7b55a5ae4e1087eaebc0c8b46537180655a (patch)
tree210e32e879d31a3f784176f7b58c0f455dd0d975
parent2e018bdac969915cd78e756d3407964bb99c41f6 (diff)
parent357f132b945c5fc38b5a5e37ed057285be6137b3 (diff)
Merge pull request #105728 from Stupremee/steam-common-mark-conversion
Convert steam documentation to common mark
-rw-r--r--doc/builders/packages/index.xml2
-rw-r--r--doc/builders/packages/steam.section.md69
-rw-r--r--doc/builders/packages/steam.xml125
3 files changed, 70 insertions, 126 deletions
diff --git a/doc/builders/packages/index.xml b/doc/builders/packages/index.xml
index e1ddfd276e20..732560ec1992 100644
--- a/doc/builders/packages/index.xml
+++ b/doc/builders/packages/index.xml
@@ -18,7 +18,7 @@
<xi:include href="nginx.section.xml" />
<xi:include href="opengl.section.xml" />
<xi:include href="shell-helpers.section.xml" />
- <xi:include href="steam.xml" />
+ <xi:include href="steam.section.xml" />
<xi:include href="cataclysm-dda.section.xml" />
<xi:include href="urxvt.section.xml" />
<xi:include href="weechat.section.xml" />
diff --git a/doc/builders/packages/steam.section.md b/doc/builders/packages/steam.section.md
new file mode 100644
index 000000000000..e33f1192f7c0
--- /dev/null
+++ b/doc/builders/packages/steam.section.md
@@ -0,0 +1,69 @@
+# Steam {#sec-steam}
+
+## Steam in Nix {#sec-steam-nix}
+
+Steam is distributed as a `.deb` file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called `steam` that in Ubuntu (their target distro) would go to `/usr/bin`. 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.
+
+Nix problems and constraints:
+
+- We don't have `/bin/bash` and many scripts point there. Similarly for `/usr/bin/python`.
+- We don't have the dynamic loader in `/lib`.
+- The `steam.sh` script in \$HOME can not be patched, as it is checked and rewritten by steam.
+- The steam binary cannot be patched, it's also checked.
+
+The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented [here](http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html). 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.
+
+## How to play {#sec-steam-play}
+
+Use `programs.steam.enable = true;` if you want to add steam to systemPackages and also enable a few workarrounds aswell as Steam controller support or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pr.
+
+## Troubleshooting {#sec-steam-troub}
+
+- **Steam fails to start. What do I do?**
+ Try to run
+
+ ```ShellSession
+ strace steam
+ ```
+
+ to see what is causing steam to fail.
+
+- **Using the FOSS Radeon or nouveau (nvidia) drivers**
+
+ - The `newStdcpp` parameter was removed since NixOS 17.09 and should not be needed anymore.
+ - 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
+ ```
+ steam.sh: line 713: 7842 Segmentation fault (core dumped)
+ ```
+ have a look at [this pull request](https://github.com/NixOS/nixpkgs/pull/20269).
+
+- **Java**
+
+ 1. There is no java in steam chrootenv by default. If you get a message like
+
+ ```
+ /home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found
+ ```
+
+ You need to add
+
+ ```nix
+ steam.override { withJava = true; };
+ ```
+
+## steam-run {#sec-steam-run}
+
+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
+
+```nix
+pkgs.steam.override ({
+ nativeOnly = true;
+ newStdcpp = true;
+ }).run
+```
+
+to your configuration, rebuild, and run the game with
+
+```
+steam-run ./foo
+```
diff --git a/doc/builders/packages/steam.xml b/doc/builders/packages/steam.xml
deleted file mode 100644
index 59673328bace..000000000000
--- a/doc/builders/packages/steam.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<section xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xml:id="sec-steam">
- <title>Steam</title>
-
- <section xml:id="sec-steam-nix">
- <title>Steam in Nix</title>
-
- <para>
- 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.
- </para>
-
- <para>
- Nix problems and constraints:
- <itemizedlist>
- <listitem>
- <para>
- We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
- </para>
- </listitem>
- <listitem>
- <para>
- We don't have the dynamic loader in <filename>/lib </filename>.
- </para>
- </listitem>
- <listitem>
- <para>
- The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
- </para>
- </listitem>
- <listitem>
- <para>
- The steam binary cannot be patched, it's also checked.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <para>
- 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.
- </para>
- </section>
-
- <section xml:id="sec-steam-play">
- <title>How to play</title>
-
- <para>
- Use <programlisting>programs.steam.enable = true;</programlisting> if you want to add steam to systemPackages and also enable a few workarrounds aswell as Steam controller support or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pr.
- </para>
- </section>
-
- <section xml:id="sec-steam-troub">
- <title>Troubleshooting</title>
-
- <para>
- <variablelist>
- <varlistentry>
- <term>
- Steam fails to start. What do I do?
- </term>
- <listitem>
- <para>
- Try to run
-<programlisting>strace steam</programlisting>
- to see what is causing steam to fail.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- Using the FOSS Radeon or nouveau (nvidia) drivers
- </term>
- <listitem>
- <itemizedlist>
- <listitem>
- <para>
- The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
- </para>
- </listitem>
- <listitem>
- <para>
- 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
-<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
- have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
- </para>
- </listitem>
- </itemizedlist>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- Java
- </term>
- <listitem>
- <orderedlist>
- <listitem>
- <para>
- There is no java in steam chrootenv by default. If you get a message like
-<programlisting>/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found</programlisting>
- You need to add
-<programlisting> steam.override { withJava = true; };</programlisting>
- to your configuration.
- </para>
- </listitem>
- </orderedlist>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </section>
-
- <section xml:id="sec-steam-run">
- <title>steam-run</title>
-
- <para>
- 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
-<programlisting>pkgs.(steam.override {
- nativeOnly = true;
- newStdcpp = true;
- }).run</programlisting>
- to your configuration, rebuild, and run the game with
-<programlisting>steam-run ./foo</programlisting>
- </para>
- </section>
-</section>