1 diff --git a/test/lit.cfg b/test/lit.cfg
2 index 118c979..b69fecc 100644
5 @@ -207,13 +207,8 @@ def is_preload_disabled():
8 elif sys.platform == 'darwin':
9 - command = ['csrutil', 'status']
10 - pattern = re.compile(r'System Integrity Protection status:\s+enabled')
12 - output = subprocess.check_output(command, stderr=subprocess.STDOUT)
13 - return any(pattern.match(line) for line in output.decode('utf-8').splitlines())
14 - except (OSError, subprocess.CalledProcessError):
16 + # csrutil(8) isn't available in the Nix build sandbox.
21 @@ -221,6 +216,11 @@ def is_preload_disabled():
22 if not is_preload_disabled():
23 config.available_features.add('preload')
25 +# Preserve the variables required for the Nix toolchain wrappers.
26 +for var, value in os.environ.items():
27 + if var.startswith('NIX_'):
28 + config.environment[var] = value
30 print(config.substitutions)
31 print(config.environment)
32 print(config.available_features)