godot_4-mono: fix build on aarch64 (#355322)

This commit is contained in:
Masum Reza 2024-11-13 17:48:20 +05:30 committed by GitHub
commit 43eac3c9e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,7 @@
scons,
speechd-minimal,
stdenv,
testers,
udev,
vulkan-loader,
wayland,
@ -56,7 +57,9 @@ let
suffix = if withMono then "-mono" else "";
attrs = rec {
arch = stdenv.hostPlatform.linuxArch;
attrs = finalAttrs: rec {
pname = "godot4${suffix}";
version = "4.3-stable";
commitHash = "77dcf97d82cbfe4e4615475fa52ca03da645dbd8";
@ -149,9 +152,9 @@ let
postBuild = lib.optionalString withMono ''
echo "Generating Glue"
if [[ ${withPrecision} == *double* ]]; then
bin/godot.${withPlatform}.${withTarget}.${withPrecision}.x86_64.mono --headless --generate-mono-glue modules/mono/glue
bin/godot.${withPlatform}.${withTarget}.${withPrecision}.${arch}.mono --headless --generate-mono-glue modules/mono/glue
else
bin/godot.${withPlatform}.${withTarget}.x86_64.mono --headless --generate-mono-glue modules/mono/glue
bin/godot.${withPlatform}.${withTarget}.${arch}.mono --headless --generate-mono-glue modules/mono/glue
fi
echo "Building C#/.NET Assemblies"
python modules/mono/build_scripts/build_assemblies.py --godot-output-dir bin --precision=${withPrecision}
@ -221,6 +224,18 @@ let
runHook postInstall
'';
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
version = lib.replaceStrings [ "-" ] [ "." ] version;
};
};
requiredSystemFeatures = [
# fixes: No space left on device
"big-parallel"
];
meta = {
changelog = "https://github.com/godotengine/godot/releases/tag/${version}";
description = "Free and Open Source 2D and 3D game engine";
@ -240,7 +255,6 @@ let
in
stdenv.mkDerivation (
finalAttrs:
if withMono then
dotnetCorePackages.addNuGetDeps {
nugetDeps = ./deps.nix;
@ -250,7 +264,7 @@ stdenv.mkDerivation (
old.buildInputs
++ lib.concatLists (lib.attrValues (lib.getAttrs runtimeIds dotnet-sdk_8.targetPackages));
};
} attrs finalAttrs
} attrs
else
attrs
)