about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-11-10 08:16:03 +0100
committeraszlig <aszlig@nix.build>2020-11-10 08:43:44 +0100
commit5128d3a1eaa741864dac3771aafb0b5326e33b76 (patch)
treeabb2c2fc26ba3e2b8cc02a06fc1fb47fa0747b8b
parent66ae8ae823993c4e71e882822d924342cea43a60 (diff)
games/starbound: Update to version 1.4.4
I already updated the game a while ago, but didn't commit it yet and
since the update has been out since a year, I think it's time to
actually update it here as well (shame on me).

This essentially includes the "new" bounty hunter update from June 2019,
which has a lot of changes.

So instead of including the changelog here, I'm hereby referring to the
upstream release announcement:

https://playstarbound.com/starbound-1-4-bounty-hunter-update/

I also changed the -Werror flag in the preloader to -Wall, since the
errors/warnings we're getting are false-positives:

  error: '__builtin_strncpy' specified bound depends on the length of
  the source argument [-Werror=stringop-overflow=]

While a warning like this usually is a concern, it's not in our case,
since the size of the destination *also* depends on the length of the
source argument.

Additionally, I changed the test to use the new
networking.interfaces.*.ipv4.addresses option instead of the legacy one
which has been deprecated for ages.

Signed-off-by: aszlig <aszlig@nix.build>
-rw-r--r--pkgs/games/humblebundle/starbound.nix15
-rw-r--r--tests/games/starbound.nix28
2 files changed, 24 insertions, 19 deletions
diff --git a/pkgs/games/humblebundle/starbound.nix b/pkgs/games/humblebundle/starbound.nix
index d3c11935..b8df170f 100644
--- a/pkgs/games/humblebundle/starbound.nix
+++ b/pkgs/games/humblebundle/starbound.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchHumbleBundle, unzip, fetchurl, writeText, SDL2, libGLU_combined
+{ stdenv, fetchHumbleBundle, unzip, fetchurl, writeText, SDL2, libGLU, libGL
 , xorg, makeDesktopItem
 }:
 
 let
   binaryDeps = {
     starbound.deps = [
-      SDL2 libGLU_combined xorg.libX11 xorg.libICE xorg.libSM xorg.libXext
+      SDL2 libGLU libGL xorg.libX11 xorg.libICE xorg.libSM xorg.libXext
     ];
     starbound.needsBootconfig = true;
 
@@ -27,7 +27,7 @@ let
     icon = fetchurl {
       url = "http://i1305.photobucket.com/albums/s544/ClockworkBarber/"
           + "logo_zps64c4860d.png";
-      sha256 = "11fiiy0vcxzix1j81732cjh16wi48k4vag040vmbhad50ps3mg0q";
+      sha256 = "1zmpmpp0856vis71b1na402js8mnc7g89r8lv0safyk4y9khwm4q";
     };
     comment = "An extraterrestrial sandbox adventure game";
     desktopName = "Starbound";
@@ -265,16 +265,19 @@ let
     int SteamAPI_Init(void) {
       return 0;
     }
+
+    void SteamAPI_RegisterCallback(void *dummy1, int dummy2) {}
+    void SteamAPI_RunCallbacks(void) {}
   '';
 
 in stdenv.mkDerivation rec {
   name = "starbound-${version}";
-  version = "1.3.3";
+  version = "1.4.4";
 
   src = fetchHumbleBundle {
     name = "starbound-linux-${version}.zip";
     machineName = "starbound_linux";
-    md5 = "91decc3a8fa9cd0be08952422f5adb39";
+    md5 = "3e9b86e622afbf72f78b160cbb65708b";
   };
 
   outputs = [ "out" "lib" "assets" ];
@@ -282,7 +285,7 @@ in stdenv.mkDerivation rec {
   nativeBuildInputs = [ unzip ];
 
   buildPhase = with stdenv.lib; ''
-    cc -Werror -shared "${preloaderSource}" -o preload.so -ldl -fPIC \
+    cc -Wall -shared "${preloaderSource}" -o preload.so -ldl -fPIC \
       -DSTARBOUND_ASSET_DIR="\"$assets\""
     ${concatStrings (mapAttrsToList patchBinary binaryDeps)}
     patchelf --remove-needed libsteam_api.so patched/starbound
diff --git a/tests/games/starbound.nix b/tests/games/starbound.nix
index 5fbb85aa..02b4466f 100644
--- a/tests/games/starbound.nix
+++ b/tests/games/starbound.nix
@@ -10,9 +10,8 @@ let
     '';
     escapeScreenshot = pkgs.lib.replaceStrings ["-"] ["_"];
   in ''
-    with client.nested("${description}"):
-      client.screenshot("before_${escapeScreenshot name}")
-      client.succeed("${pkgs.xdotool}/bin/xdotool '${xdoFile}'")
+    client.screenshot("before_${escapeScreenshot name}")
+    client.succeed("${pkgs.xdotool}/bin/xdotool '${xdoFile}'")
   '';
 
   clickAt = name: x: y: xdo {
@@ -38,7 +37,7 @@ in {
   enableOCR = true;
 
   nodes = {
-    server = {
+    server = { lib, ... }: {
       vuizvui.services.starbound = {
         enable = true;
         # Use a different dataDir than the default to make
@@ -47,12 +46,14 @@ in {
         users.alice.password = "secret";
       };
       virtualisation.memorySize = 2047;
-      networking.interfaces.eth1.ipAddress = "192.168.0.1";
-      networking.interfaces.eth1.prefixLength = 24;
+      networking.interfaces.eth1.ipv4.addresses = lib.singleton {
+        address = "192.168.0.1";
+        prefixLength = 24;
+      };
       networking.firewall.enable = false;
     };
 
-    client = { pkgs, ... }: {
+    client = { lib, pkgs, ... }: {
       imports = [
         "${nixpkgsPath}/nixos/tests/common/x11.nix"
       ];
@@ -60,8 +61,10 @@ in {
       environment.systemPackages = [
         pkgs.vuizvui.games.humblebundle.starbound
       ];
-      networking.interfaces.eth1.ipAddress = "192.168.0.2";
-      networking.interfaces.eth1.prefixLength = 24;
+      networking.interfaces.eth1.ipv4.addresses = lib.singleton {
+        address = "192.168.0.2";
+        prefixLength = 24;
+      };
       networking.firewall.enable = false;
     };
   };
@@ -70,10 +73,9 @@ in {
     # fmt: off
     server.wait_for_unit("starbound.service")
 
-    with client.nested("waiting for client to start up"):
-      client.wait_for_x()
-      client.succeed("starbound >&2 &")
-      client.wait_for_text('(?i)options')
+    client.wait_for_x()
+    client.succeed("starbound >&2 &")
+    client.wait_for_text('(?i)options')
 
     ${clickAt "join-game" 100 560}
     client.wait_for_text('(?i)select')