add mainprogram wrapper

This commit is contained in:
Robin Appelman 2026-07-08 01:37:56 +02:00
commit 34b1e8d540

View file

@ -57,6 +57,11 @@
patches = (prev.patches or []) ++ [./curl-symbol-downgrade.patch];
}
);
mainProgram =
if system == "x86_64-linux"
then "srcds_run_64"
else "srcds_run";
in
stdenvNoCC.mkDerivation {
pname = "srcds-tf2";
@ -82,10 +87,17 @@ in
echo 440 > $out/steam_appid.txt
mkdir -p $out/bin
echo "#! /bin/sh" > $out/bin/${mainProgram}
echo "exec $out/${mainProgram} "'$@' >> $out/bin/${mainProgram}
chmod +x $out/bin/${mainProgram}
runHook postInstall
'';
meta = with lib; {
inherit mainProgram;
description = "TF2 dedicated server";
homepage = "https://steamdb.info/app/440/";
changelog = "https://store.steampowered.com/news/app/440?updates=true";