terraria-server: add mainProgram and small refactor

This commit is contained in:
TomaSajt 2023-08-22 23:16:33 +02:00
parent e2b5418ca2
commit b80c7a7358
No known key found for this signature in database
GPG Key ID: F011163C050122A1

View File

@ -1,4 +1,11 @@
{ stdenv, lib, file, fetchurl, autoPatchelfHook, unzip }: { lib
, stdenv
, fetchurl
, autoPatchelfHook
, unzip
, zlib
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "terraria-server"; pname = "terraria-server";
@ -10,8 +17,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Mk+5s9OlkyTLXZYVT0+8Qcjy2Sb5uy2hcC8CML0biNY="; sha256 = "sha256-Mk+5s9OlkyTLXZYVT0+8Qcjy2Sb5uy2hcC8CML0biNY=";
}; };
buildInputs = [ file stdenv.cc.cc.libgcc ];
nativeBuildInputs = [ autoPatchelfHook unzip ]; nativeBuildInputs = [ autoPatchelfHook unzip ];
buildInputs = [ stdenv.cc.cc.libgcc zlib ];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -29,6 +36,7 @@ stdenv.mkDerivation rec {
description = "Dedicated server for Terraria, a 2D action-adventure sandbox"; description = "Dedicated server for Terraria, a 2D action-adventure sandbox";
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
license = licenses.unfree; license = licenses.unfree;
maintainers = with maintainers; [ ncfavier ]; mainProgram = "TerrariaServer";
maintainers = with maintainers; [ ncfavier tomasajt ];
}; };
} }