From 526f720d12f227a0e4e9643a27a0761496740ef7 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 26 Nov 2024 20:36:27 -0500 Subject: [PATCH] Handle case of OD in BYOND patchelf --- build/package/nix/tgstation-server.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/package/nix/tgstation-server.nix b/build/package/nix/tgstation-server.nix index 6fed2aab18..745391341a 100644 --- a/build/package/nix/tgstation-server.nix +++ b/build/package/nix/tgstation-server.nix @@ -21,6 +21,12 @@ let ]; byond-patcher = pkgs-i686.writeShellScriptBin "EngineInstallComplete-050-TgsPatchELFByond.sh" '' + # If the file doesn't exist, assume OD + if [[ ! -f ../../Byond/$1/byond/bin/DreamDaemon ]] ; then + echo "DreamDaemon doesn't appear to exist. Assuming OD install" + exit + fi + BYOND_PATH=$(realpath ../../Byond/$1/byond/bin/) ${pkgs.patchelf}/bin/patchelf --set-interpreter "$(cat ${stdenv.cc}/nix-support/dynamic-linker)" \