From 67eb0f0494e5996fa405ff96d6819ffc95a6cec2 Mon Sep 17 00:00:00 2001 From: timoreo Date: Fri, 19 Sep 2025 18:02:31 +0200 Subject: [PATCH] godot: fix obj being copied to output --- pkgs/development/tools/godot/common.nix | 53 ++++++++++++++----------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/pkgs/development/tools/godot/common.nix b/pkgs/development/tools/godot/common.nix index 1c408d743c43..e2b8edfa63c7 100644 --- a/pkgs/development/tools/godot/common.nix +++ b/pkgs/development/tools/godot/common.nix @@ -342,34 +342,39 @@ let ''; # From: https://github.com/godotengine/godot/blob/4.2.2-stable/SConstruct - sconsFlags = mkSconsFlagsFromAttrSet { - # Options from 'SConstruct' - precision = withPrecision; # Floating-point precision level - production = true; # Set defaults to build Godot for use in production - platform = withPlatform; - inherit target; - debug_symbols = true; + sconsFlags = mkSconsFlagsFromAttrSet ( + { + # Options from 'SConstruct' + precision = withPrecision; # Floating-point precision level + production = true; # Set defaults to build Godot for use in production + platform = withPlatform; + inherit target; + debug_symbols = true; - # Options from 'platform/linuxbsd/detect.py' - alsa = withAlsa; - dbus = withDbus; # Use D-Bus to handle screensaver and portal desktop settings - fontconfig = withFontconfig; # Use fontconfig for system fonts support - pulseaudio = withPulseaudio; # Use PulseAudio - speechd = withSpeechd; # Use Speech Dispatcher for Text-to-Speech support - touch = withTouch; # Enable touch events - udev = withUdev; # Use udev for gamepad connection callbacks - wayland = withWayland; # Compile with Wayland support - x11 = withX11; # Compile with X11 support + # Options from 'platform/linuxbsd/detect.py' + alsa = withAlsa; + dbus = withDbus; # Use D-Bus to handle screensaver and portal desktop settings + fontconfig = withFontconfig; # Use fontconfig for system fonts support + pulseaudio = withPulseaudio; # Use PulseAudio + speechd = withSpeechd; # Use Speech Dispatcher for Text-to-Speech support + touch = withTouch; # Enable touch events + udev = withUdev; # Use udev for gamepad connection callbacks + wayland = withWayland; # Compile with Wayland support + x11 = withX11; # Compile with X11 support - module_mono_enabled = withMono; + module_mono_enabled = withMono; - # aliasing bugs exist with hardening+LTO - # https://github.com/godotengine/godot/pull/104501 - ccflags = "-fno-strict-aliasing"; - linkflags = "-Wl,--build-id"; + # aliasing bugs exist with hardening+LTO + # https://github.com/godotengine/godot/pull/104501 + ccflags = "-fno-strict-aliasing"; + linkflags = "-Wl,--build-id"; - use_sowrap = false; - }; + use_sowrap = false; + } + // lib.optionalAttrs (lib.versionAtLeast version "4.5") { + redirect_build_objects = false; # Avoid copying build objects to output + } + ); enableParallelBuilding = true;