about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/terraria-server/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-06-04 10:19:13 +0000
committerAlyssa Ross <hi@alyssa.is>2020-06-04 22:45:31 +0000
commitda8562f302a145605a3270114ea7063daa82a173 (patch)
treeb27c6d509bad0ee5449f1fcf261a7ec3210df495 /nixpkgs/pkgs/games/terraria-server/default.nix
parent17df60ef482ef52b2088e1913de9cd436320612a (diff)
parent467ce5a9f45aaf96110b41eb863a56866e1c2c3c (diff)
downloadnixlib-da8562f302a145605a3270114ea7063daa82a173.tar
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.gz
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.bz2
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.lz
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.xz
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.zst
nixlib-da8562f302a145605a3270114ea7063daa82a173.zip
Merge commit '467ce5a9f45aaf96110b41eb863a56866e1c2c3c'
Diffstat (limited to 'nixpkgs/pkgs/games/terraria-server/default.nix')
-rw-r--r--nixpkgs/pkgs/games/terraria-server/default.nix26
1 files changed, 10 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/games/terraria-server/default.nix b/nixpkgs/pkgs/games/terraria-server/default.nix
index dab0b653ee9c..d3198e2b35c0 100644
--- a/nixpkgs/pkgs/games/terraria-server/default.nix
+++ b/nixpkgs/pkgs/games/terraria-server/default.nix
@@ -1,36 +1,30 @@
-{ stdenv, lib, file, fetchurl, unzip }:
+{ stdenv, lib, file, fetchurl, autoPatchelfHook, unzip }:
 
 stdenv.mkDerivation rec {
   pname = "terraria-server";
-  version = "1.3.5.3";
-  urlVersion = lib.replaceChars ["."] [""] version;
+  version = "1.4.0.4";
+  urlVersion = lib.replaceChars [ "." ] [ "" ] version;
 
   src = fetchurl {
-    url = "https://terraria.org/server/terraria-server-${urlVersion}.zip";
-    sha256 = "0l7j2n6ip4hxph7dfal7kzdm3dqnm1wba6zc94gafkh97wr35ck3";
+    url = "https://terraria.org/system/dedicated_servers/archives/000/000/038/original/terraria-server-${urlVersion}.zip";
+    sha256 = "09zkadjd04gbx1yvwpqmm89viydwxqgixbqhbqncb94qb2z5gfxk";
   };
 
   buildInputs = [ file unzip ];
+  nativeBuildInputs = [ autoPatchelfHook ];
 
   installPhase = ''
     mkdir -p $out/bin
     cp -r Linux $out/
     chmod +x "$out/Linux/TerrariaServer.bin.x86_64"
     ln -s "$out/Linux/TerrariaServer.bin.x86_64" $out/bin/TerrariaServer
-    # Fix "/lib64/ld-linux-x86-64.so.2" like references in ELF executables.
-    find "$out" | while read filepath; do
-      if file "$filepath" | grep -q "ELF.*executable"; then
-        echo "setting interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) in $filepath"
-        patchelf --set-interpreter "$(cat "$NIX_CC"/nix-support/dynamic-linker)" "$filepath"
-        test $? -eq 0 || { echo "patchelf failed to process $filepath"; exit 1; }
-      fi
-    done
   '';
 
   meta = with lib; {
-    homepage = "http://terraria.org";
-    description = "Dedicated server for Terraria, a 2D action-adventure sandbox";
-    platforms = ["x86_64-linux"];
+    homepage = "https://terraria.org";
+    description =
+      "Dedicated server for Terraria, a 2D action-adventure sandbox";
+    platforms = [ "x86_64-linux" ];
     license = licenses.unfree;
   };
 }