Skip to content

Commit 571212e

Browse files
authored
Merge pull request #87966 from helsinki-systems/upd/terraria14
terraria-server: 1.3.5.3 -> 1.4.0.3
2 parents 4e4e116 + 466fb98 commit 571212e

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed
+10-16
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
1-
{ stdenv, lib, file, fetchurl, unzip }:
1+
{ stdenv, lib, file, fetchurl, autoPatchelfHook, unzip }:
22

33
stdenv.mkDerivation rec {
44
pname = "terraria-server";
5-
version = "1.3.5.3";
6-
urlVersion = lib.replaceChars ["."] [""] version;
5+
version = "1.4.0.3";
6+
urlVersion = lib.replaceChars [ "." ] [ "" ] version;
77

88
src = fetchurl {
9-
url = "https://terraria.org/server/terraria-server-${urlVersion}.zip";
10-
sha256 = "0l7j2n6ip4hxph7dfal7kzdm3dqnm1wba6zc94gafkh97wr35ck3";
9+
url = "https://terraria.org/system/dedicated_servers/archives/000/000/037/original/terraria-server-${urlVersion}.zip";
10+
sha256 = "1g9rd0a40gsljk8xp3bkvwy8ngywjzk8chf2x9l43s2kf40ib0p8";
1111
};
1212

1313
buildInputs = [ file unzip ];
14+
nativeBuildInputs = [ autoPatchelfHook ];
1415

1516
installPhase = ''
1617
mkdir -p $out/bin
1718
cp -r Linux $out/
1819
chmod +x "$out/Linux/TerrariaServer.bin.x86_64"
1920
ln -s "$out/Linux/TerrariaServer.bin.x86_64" $out/bin/TerrariaServer
20-
# Fix "/lib64/ld-linux-x86-64.so.2" like references in ELF executables.
21-
find "$out" | while read filepath; do
22-
if file "$filepath" | grep -q "ELF.*executable"; then
23-
echo "setting interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) in $filepath"
24-
patchelf --set-interpreter "$(cat "$NIX_CC"/nix-support/dynamic-linker)" "$filepath"
25-
test $? -eq 0 || { echo "patchelf failed to process $filepath"; exit 1; }
26-
fi
27-
done
2821
'';
2922

3023
meta = with lib; {
31-
homepage = "http://terraria.org";
32-
description = "Dedicated server for Terraria, a 2D action-adventure sandbox";
33-
platforms = ["x86_64-linux"];
24+
homepage = "https://terraria.org";
25+
description =
26+
"Dedicated server for Terraria, a 2D action-adventure sandbox";
27+
platforms = [ "x86_64-linux" ];
3428
license = licenses.unfree;
3529
};
3630
}

0 commit comments

Comments
 (0)