diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-01-27 21:50:46 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-01-27 22:02:43 +0000 |
commit | abcad620c630605e3f6a7978085b6c94aaacd2be (patch) | |
tree | 01383dec3c063456cd1c7f2770d5bf7d8b3f2239 /pkgs | |
parent | 8291dfb1b41c9a9de6b7210bf7057ea69ebc687c (diff) |
godot: fix NIX_* environment propagations to scons
scons build system does not work by default in nixpkgs envoironment as it filters system environment and throws away NIX_* flags: https://scons.org/doc/2.1.0/HTML/scons-user/x1750.html Fix build system to always propagate os.environment.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/godot/3/dont_clobber_environment.patch | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/pkgs/development/tools/godot/3/dont_clobber_environment.patch b/pkgs/development/tools/godot/3/dont_clobber_environment.patch index 74e1241513ba8..cfd3113a6aaea 100644 --- a/pkgs/development/tools/godot/3/dont_clobber_environment.patch +++ b/pkgs/development/tools/godot/3/dont_clobber_environment.patch @@ -1,19 +1,23 @@ -diff --git a/SConstruct b/SConstruct -index d138c7b250..c925bf908e 100644 +scons does not use os environment by default: + https://scons.org/doc/2.1.0/HTML/scons-user/x1750.html + +nixpkgs' cc-wrapper on the other hand relies on various NIX_* variables +to be passed through like NIX_CFLAGS_COMPILE_BEFORE. --- a/SConstruct +++ b/SConstruct -@@ -65,10 +65,10 @@ elif platform_arg == "javascript": - # 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) +@@ -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"] -+for k in ("TERM", "PATH", "PKG_CONFIG_PATH"): -+ if (k in os.environ): -+ env_base["ENV"][k] = os.environ[k] -+ - ++env_base = Environment(ENV = os.environ, tools=custom_tools) + env_base.disabled_modules = [] env_base.use_ptrcall = False |