WIP: satisfactory 1.0 dedicated server

This commit is contained in:
xenia 2024-09-11 04:46:43 -04:00
parent d63bdc6819
commit 14245582a8
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchFromSteam,
SDL2
}:
let
appId = "1690800";
buildId = "15636842";
steamworks_sdk = fetchFromSteam {
name = "steamworks-sdk";
inherit appId;
depot = {
depotId = "1006";
manifestId = "7138471031118904166";
};
hash = "sha256-OtPI1kAx6+9G09IEr2kYchyvxlPl3rzx/ai/xEVG4oM=";
};
server_dist = fetchFromSteam {
name = "satisfactory-dedicated-server";
inherit appId;
depot = {
depotId = "1690802";
manifestId = "1910179703516567959";
};
hash = "sha256-TxPegZFAwiAzuHgw9xLGr5sAP7KAVMMfPFYL7TRX1O0=";
};
in stdenv.mkDerivation {
pname = "satisfactory-dedicated-server";
version = "build-${buildId}";
src = server_dist;
buildInputs = [ steamworks_sdk ];
propagatedBuildInputs = [ SDL2 ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out
cp -r . $out/.
cp -r ${steamworks_sdk}/linux64 $out
mkdir -p $out/FactoryGame/Intermediate
mkdir -p $out/FactoryGame/Saved
rm $out/FactoryServer.sh
'';
dontStrip = true;
dontPatchELF = true;
dontPatchShebangs = true;
dontPruneLibtoolFiles = true;
preFixup = ''
echo patching binaries
chmod +x $out/Engine/Binaries/Linux/FactoryServer-Linux-Shipping
patchelf --add-needed ${SDL2}/lib/libSDL2-2.0.so.0 \
$out/linux64/steamclient.so
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--add-needed $out/linux64/steamclient.so \
$out/Engine/Binaries/Linux/FactoryServer-Linux-Shipping
'';
meta = with lib; {
description = "Satisfactory Dedicated Server";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
};
}

View File

@ -0,0 +1 @@
/nix/store/j0r1vyd1hd43rjzaday70wny2lhjkc1p-satisfactory-dedicated-server-build-15636842