e138e656c7
The godot base derivation was implemented by passing a recursive attrset to mkDerivation. This is problematic because recursive references to attributes that are later overridden don't notice the override. Switched to the approach of giving mkDerivation a lambda that receives a self argument, which allows recursive references to the final value after overrides are applied. The related derivations (for export templates, headless, and server builds of godot) duplicated content from the base derivation. This refactor eliminated that by using overridable attributes to parameterize the scripts. The main motivation for this refactor was to help me add derivations for mono builds of godot. Renamed to godot3 to distinguish from version 4, which is a complete rewrite and effectively a different tool altogether.
20 lines
878 B
Diff
20 lines
878 B
Diff
diff --git a/SConstruct b/SConstruct
|
|
index 057ec7628c..760be89fff 100644
|
|
--- a/SConstruct
|
|
+++ b/SConstruct
|
|
@@ -67,14 +67,7 @@ elif platform_arg == "javascript":
|
|
elif os.name == "nt" and methods.get_cmdline_bool("use_mingw", False):
|
|
custom_tools = ["mingw"]
|
|
|
|
-# We let SCons build its default ENV as it includes OS-specific things which we don't
|
|
-# want to have to pull in manually.
|
|
-# Then we prepend PATH to make it take precedence, while preserving SCons' own entries.
|
|
-env_base = Environment(tools=custom_tools)
|
|
-env_base.PrependENVPath("PATH", os.getenv("PATH"))
|
|
-env_base.PrependENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH"))
|
|
-if "TERM" in os.environ: # Used for colored output.
|
|
- env_base["ENV"]["TERM"] = os.environ["TERM"]
|
|
+env_base = Environment(ENV = os.environ, tools=custom_tools)
|
|
|
|
env_base.disabled_modules = []
|
|
env_base.use_ptrcall = False
|