fix i686 build

This commit is contained in:
Robin Appelman 2026-07-10 18:10:33 +02:00
commit 7dc7a7c1cb

View file

@ -17,8 +17,10 @@
hl2sdk, hl2sdk,
sdk, sdk,
writeTextDir, writeTextDir,
pkgsCross,
requireFile,
}: let }: let
inherit (lib) importJSON map toString elem last replaceStrings naturalSort filter any optionals; inherit (lib) importJSON map toString elem last replaceStrings naturalSort filter any optionals optionalString;
depotInputs = importJSON ./depots.json; depotInputs = importJSON ./depots.json;
fetchSupported = elem system depotdownloader.meta.platforms; fetchSupported = elem system depotdownloader.meta.platforms;
fetcher = input: fetcher = input:
@ -34,18 +36,17 @@
} }
else else
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "steam-depot-${toString input.app_id}-${toString input.depot_id}"; name = "steam-depot-${toString input.app_id}-${toString input.depot_id}-depot";
outputHashAlgo = "sha256"; outputHashAlgo = "sha256";
outputHashMode = "recursive"; outputHashMode = "recursive";
outputHash = input.hash; outputHash = input.hash;
preferLocalBuild = true;
allowSubstitutes = false;
builder = writeScript "restrict-message" '' builder = writeScript "restrict-message" ''
source ${stdenvNoCC}/setup source ${stdenvNoCC}/setup
cat <<_EOF_ cat <<_EOF_
$out $out
fetchSteam is not supported on your platform fetchSteam is not supported on your platform.
You can build srcds for x86_64-linux first to fetch the depot.
_EOF_ _EOF_
exit 1 exit 1
@ -87,9 +88,6 @@
cp -rL . $out cp -rL . $out
chmod -R +w $out chmod -R +w $out
# the steamclient.so included in the depot is 32bit so it wont work
cp ${steamworks-sdk-redist}/lib/steamclient.so $out/bin/linux64/steamclient.so
echo 440 > $out/steam_appid.txt echo 440 > $out/steam_appid.txt
mkdir -p $out/bin mkdir -p $out/bin
@ -101,6 +99,11 @@
runHook postInstall runHook postInstall
''; '';
postInstall = optionalString (system == "x86_64-linux") ''
# the steamclient.so included in the depot is 32bit so it wont work
cp ${steamworks-sdk-redist}/lib/steamclient.so $out/bin/linux64/steamclient.so
'';
passthru = { passthru = {
customize = { customize = {
cfg ? {}, cfg ? {},