From 54f636371a7e002e24888ae3bea33f66199cc8bb Mon Sep 17 00:00:00 2001 From: Paul Hendry Date: Fri, 3 Jun 2016 13:40:25 -0700 Subject: [PATCH] terraria-server: 1.3.0.8 -> 1.3.1.1 --- pkgs/games/terraria-server/default.nix | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/games/terraria-server/default.nix b/pkgs/games/terraria-server/default.nix index 4eeefc2801b..59dabf2f9cd 100644 --- a/pkgs/games/terraria-server/default.nix +++ b/pkgs/games/terraria-server/default.nix @@ -1,26 +1,23 @@ -{ stdenv, lib, file, fetchurl }: +{ stdenv, lib, file, fetchurl, unzip }: assert stdenv.system == "x86_64-linux"; stdenv.mkDerivation rec { name = "terraria-server-${version}"; - version = "1308"; + version = "1.3.1.1"; + urlVersion = lib.replaceChars ["."] [""] version; src = fetchurl { - url = http://terraria.org/server/terraria-server-linux-1308.tar.gz; - sha256 = "0cx3nx7wmzcw9l0nz9zm4amccl8nrd09hlb3jc1yrqcaswbyxc8a"; + url = "http://terraria.org/server/terraria-server-${urlVersion}.zip"; + sha256 = "0bwh0na0dy6cjc1xchd5sp3c7av50q38hk03219dmqd72n9p44rq"; }; - buildInputs = [ file ]; - - sourceRoot = "."; + buildInputs = [ file unzip ]; installPhase = '' mkdir -p $out/bin - cp -r * $out/ - ln -s $out/terraria-server-linux-${version}/TerrariaServer.bin.x86_64 $out/bin/TerrariaServer - + cp -r Linux $out/ + ln -s "$out/Linux/TerrariaServer.bin.x86_64" $out/bin/TerrariaServer # Fix "/lib64/ld-linux-x86-64.so.2" like references in ELF executables. - echo "running patchelf on prebuilt binaries:" 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" @@ -32,7 +29,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = http://terraria.org; - description = "Dedicated server for the main game"; + description = "Dedicated server for Terraria, a 2D action-adventure sandbox"; platforms = platforms.linux; license = licenses.unfree; };