nixpkgs/pkgs/tools/misc/rmlint/scons-nix-env.patch
Sergei Trofimovich f6647dfd94 rmlint: 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. Drop the
workarounds that pass subset of the variables through.
2023-01-27 19:08:46 +00:00

20 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":