From bbfc470e6b2908d933e1b3b5ec8c01b0a8110c06 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 15 Aug 2016 17:39:32 +0200 Subject: pkgs/games: Add Starbound 1.0.5 from HumbleBundle 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 --- pkgs/games/humblebundle/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/games/humblebundle/default.nix') diff --git a/pkgs/games/humblebundle/default.nix b/pkgs/games/humblebundle/default.nix index d0e564b8..1c1e7a21 100644 --- a/pkgs/games/humblebundle/default.nix +++ b/pkgs/games/humblebundle/default.nix @@ -23,6 +23,7 @@ let megabytepunch = callPackage ./megabytepunch.nix {}; rocketbirds = callPackage ./rocketbirds.nix {}; spaz = callPackage ./spaz.nix {}; + starbound = callPackage ./starbound.nix {}; swordsandsoldiers = callPackage ./swordsandsoldiers.nix {}; unepic = callPackage ./unepic.nix {}; }; -- cgit 1.4.1