mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 03:03:37 +00:00
ec4de10162
The previous build system patch was incomplete and left the `wrapper.d` directory empty, leaving Bear unable to pick up any build commands at all and breaking the functional test suite, which we also weren't running. Switch to overriding CMake flags instead and add the patches and dependencies necessary to get the functional tests running to prevent a future regression. I've checked that the instructions in Nix's `doc/manual/src/contributing/hacking.md` work after this change, which is what started this yak shave in the first place.
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
diff --git a/test/lit.cfg b/test/lit.cfg
|
|
index 118c979..b69fecc 100644
|
|
--- a/test/lit.cfg
|
|
+++ b/test/lit.cfg
|
|
@@ -207,13 +207,8 @@ def is_preload_disabled():
|
|
if is_windows:
|
|
return True
|
|
elif sys.platform == 'darwin':
|
|
- command = ['csrutil', 'status']
|
|
- pattern = re.compile(r'System Integrity Protection status:\s+enabled')
|
|
- try:
|
|
- output = subprocess.check_output(command, stderr=subprocess.STDOUT)
|
|
- return any(pattern.match(line) for line in output.decode('utf-8').splitlines())
|
|
- except (OSError, subprocess.CalledProcessError):
|
|
- return False
|
|
+ # csrutil(8) isn't available in the Nix build sandbox.
|
|
+ return True
|
|
else:
|
|
return False
|
|
|
|
@@ -221,6 +216,11 @@ def is_preload_disabled():
|
|
if not is_preload_disabled():
|
|
config.available_features.add('preload')
|
|
|
|
+# Preserve the variables required for the Nix toolchain wrappers.
|
|
+for var, value in os.environ.items():
|
|
+ if var.startswith('NIX_'):
|
|
+ config.environment[var] = value
|
|
+
|
|
print(config.substitutions)
|
|
print(config.environment)
|
|
print(config.available_features)
|