aboutsummaryrefslogtreecommitdiff
path: root/pkgs/games/terraria-server/default.nix
diff options
context:
space:
mode:
authorPaul Hendry <paul@pshendry.com>2016-06-03 13:40:25 -0700
committerPaul Hendry <paul@pshendry.com>2016-06-04 14:34:53 -0700
commit54f636371a7e002e24888ae3bea33f66199cc8bb (patch)
treeb4c20ae3ecb92a346a0752fa4f28eaee87761889 /pkgs/games/terraria-server/default.nix
parent3f80f0149f65bcd17b925c0a3fca9e73707cbf8d (diff)
terraria-server: 1.3.0.8 -> 1.3.1.1
Diffstat (limited to 'pkgs/games/terraria-server/default.nix')
-rw-r--r--pkgs/games/terraria-server/default.nix21
1 files changed, 9 insertions, 12 deletions
diff --git a/pkgs/games/terraria-server/default.nix b/pkgs/games/terraria-server/default.nix
index 4eeefc2801b5..59dabf2f9cde 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;
};