10 stdenv.mkDerivation rec {
11 pname = "terraria-server";
13 urlVersion = lib.replaceStrings [ "." ] [ "" ] version;
16 url = "https://terraria.org/api/download/pc-dedicated-server/terraria-server-${urlVersion}.zip";
17 sha256 = "sha256-Mk+5s9OlkyTLXZYVT0+8Qcjy2Sb5uy2hcC8CML0biNY=";
20 nativeBuildInputs = [ autoPatchelfHook unzip ];
21 buildInputs = [ stdenv.cc.cc.libgcc zlib ];
28 chmod +x "$out/Linux/TerrariaServer.bin.x86_64"
29 ln -s "$out/Linux/TerrariaServer.bin.x86_64" $out/bin/TerrariaServer
35 homepage = "https://terraria.org";
36 description = "Dedicated server for Terraria, a 2D action-adventure sandbox";
37 platforms = [ "x86_64-linux" ];
38 license = licenses.unfree;
39 mainProgram = "TerrariaServer";
40 maintainers = with maintainers; [ ncfavier tomasajt ];