@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
66 urlVersion = lib.replaceChars [ "." ] [ "" ] version;
77
88 src = fetchurl {
9− url = "https://terraria.org/system/dedicated_servers/archives/000/000/046/original/terraria-server-${urlVersion}.zip";
9+ url = "https://terraria.org/api/download/pc-dedicated-server/terraria-server-${urlVersion}.zip";
1010 sha256 = "0qm4pbm1d9gax47fk4zhw9rcxvajxs36w7dghirli89i994r7g8j";
1111 };
1212
@@ -14,17 +14,21 @@ stdenv.mkDerivation rec {
1414 nativeBuildInputs = [ autoPatchelfHook unzip ];
1515
1616 installPhase = ''
17+ runHook preInstall
18+
1719 mkdir -p $out/bin
1820 cp -r Linux $out/
1921 chmod +x "$out/Linux/TerrariaServer.bin.x86_64"
2022 ln -s "$out/Linux/TerrariaServer.bin.x86_64" $out/bin/TerrariaServer
23+
24+ runHook postInstall
2125 '';
2226
2327 meta = with lib; {
2428 homepage = "https://terraria.org";
25− description =
26− "Dedicated server for Terraria, a 2D action-adventure sandbox";
29+ description = "Dedicated server for Terraria, a 2D action-adventure sandbox";
2730 platforms = [ "x86_64-linux" ];
2831 license = licenses.unfree;
32+ maintainers = with maintainers; [ ncfavier ];
2933 };
3034}