depot/third_party/nixpkgs/pkgs/tools/misc/rmlint/scons-nix-env.patch
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

19 lines
654 B
Diff

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
@@ -559,10 +559,7 @@ options = dict(
SHLINKCOMSTR=link_shared_library_message,
LINKCOMSTR=link_program_message,
PREFIX=GetOption('prefix'),
- ENV = dict([ (key, os.environ[key])
- for key in os.environ
- if key in ['PATH', 'TERM', 'HOME', 'PKG_CONFIG_PATH']
- ])
+ ENV = os.environ,
)
if ARGUMENTS.get('VERBOSE') == "1":