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,
sdk,
writeTextDir,
pkgsCross,
requireFile,
}: 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;
fetchSupported = elem system depotdownloader.meta.platforms;
fetcher = input:
@ -34,18 +36,17 @@
}
else
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";
outputHashMode = "recursive";
outputHash = input.hash;
preferLocalBuild = true;
allowSubstitutes = false;
builder = writeScript "restrict-message" ''
source ${stdenvNoCC}/setup
cat <<_EOF_
$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_
exit 1
@ -87,9 +88,6 @@
cp -rL . $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
mkdir -p $out/bin
@ -101,6 +99,11 @@
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 = {
customize = {
cfg ? {},