about summary refs log tree commit diff
path: root/pkgs/games/humblebundle/starbound.nix
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/games: Add Starbound 1.0.5 from HumbleBundleaszlig2016-08-151-0/+327
So far we only had the Steam version of Starbound, but since July 22nd 2016 version 1.0 got released and since then had a few bugfixes already. The Nix implementation here is based on the Steam version but has quite some improvements: Instead of wrapping the Starbound client and server with a shell script which sets up the bootconfig, we now use patchelf to override specific symbols from external libraries and thus can live without supplying a -bootconfig arg. By replacing the sbinit.config in the .rdata section of the binaries with a magic value (13 times the bell character) we can later match the magic value during open() and provide a default bootconfig using a temporary file. Note that it has to be a temporary file instead of fork() and writing to a pipe() because Starbound is using lseek() during parsing of JSON. With all this in place we now have everything Starbound related in $XDG_DATA_HOME/starbound, which is the main reason for doing the preloading in the first place. Starbound without patching expects a file called sbinit.config in the same directory as the executable and even if we'd supply a bootconfig via the -bootconfig arg, we can only have static paths in there, because Starbound doesn't do environment variable expansion within paths in the bootconfig. Another difference to the Steam packaging is that we now produce multiple outputs, the default one plus lib for the preload library and the assets in its own store path. Signed-off-by: aszlig <aszlig@redmoonstudios.org>