Last active
January 7, 2022 11:04
-
-
Save nicball/aa4b6a41c18c52c49a729df8668ecf28 to your computer and use it in GitHub Desktop.
terraria server for raspberry pi 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, fetchurl, unzip, mono, makeWrapper }: | |
stdenv.mkDerivation rec { | |
pname = "terraria-server"; | |
version = "1.4.3.2"; | |
urlVersion = lib.replaceChars [ "." ] [ "" ] version; | |
src = fetchurl { | |
url = "https://terraria.org/api/download/pc-dedicated-server/terraria-server-${urlVersion}.zip"; | |
sha256 = "sha256-/OClQTO9iBRQk3iTvYbjG1cCicKIBh+yi2OFpurJx8U="; | |
}; | |
nativeBuildInputs = [ unzip makeWrapper ]; | |
installPhase = '' | |
runHook preInstall | |
mkdir -p $out/bin | |
rm Linux/System* | |
rm Linux/Mono* | |
rm Linux/monoconfig | |
rm Linux/mscorlib.dll | |
cp -r Linux $out/ | |
makeWrapper ${mono}/bin/mono $out/bin/terraria-server --argv0 terraria-server --add-flags "--server --gc=sgen -O=all $out/Linux/TerrariaServer.exe" | |
runHook postInstall | |
''; | |
meta = with lib; { | |
homepage = "https://terraria.org"; | |
description = "Dedicated server for Terraria, a 2D action-adventure sandbox"; | |
platforms = [ "aarch64-linux" ]; | |
license = licenses.unfree; | |
maintainers = [ { name = "nicball"; email = "[email protected]"; } ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment