diff options
author | Janne Heß <janne@hess.ooo> | 2020-05-21 19:35:22 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2020-05-21 19:35:57 +0200 |
commit | 466fb98bcd8bb7b832e1e2b70ab7fd085764fcce (patch) | |
tree | 18fb962fd5e7376b734904f78c2abda0b20ce5f3 /pkgs/games/terraria-server | |
parent | 4f6cd4f6c6f3ae16bdc4dfb6830a446856d3f783 (diff) | |
download | nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.tar nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.tar.gz nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.tar.bz2 nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.tar.lz nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.tar.xz nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.tar.zst nixpkgs-466fb98bcd8bb7b832e1e2b70ab7fd085764fcce.zip |
terraria-server: 1.3.5.3 -> 1.4.0.3
Also use autoPatchelfHook and nixfmt it
Diffstat (limited to 'pkgs/games/terraria-server')
-rw-r--r-- | pkgs/games/terraria-server/default.nix | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/pkgs/games/terraria-server/default.nix b/pkgs/games/terraria-server/default.nix index dab0b653ee9..c61d2733c06 100644 --- a/pkgs/games/terraria-server/default.nix +++ b/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.3"; + 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/037/original/terraria-server-${urlVersion}.zip"; + sha256 = "1g9rd0a40gsljk8xp3bkvwy8ngywjzk8chf2x9l43s2kf40ib0p8"; }; 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; }; } |