1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

package.nix: Apply OBJC_DISABLE_INITIALIZE_FORK_SAFETY workaround

This was previously already used in the launchd configuration for
nix-daemon.

(cherry picked from commit 855741aea5)
This commit is contained in:
Robert Hensing 2024-03-05 14:35:05 +01:00
parent 67f95755d6
commit 2a34510776

View file

@ -349,8 +349,14 @@ in {
# Needed for tests if we are not doing a build, but testing existing # Needed for tests if we are not doing a build, but testing existing
# built Nix. # built Nix.
preInstallCheck = lib.optionalString (! doBuild) '' preInstallCheck =
lib.optionalString (! doBuild) ''
mkdir -p src/nix-channel mkdir -p src/nix-channel
''
# See https://github.com/NixOS/nix/issues/2523
# Occurs often in tests since https://github.com/NixOS/nix/pull/9900
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
''; '';
separateDebugInfo = !stdenv.hostPlatform.isStatic; separateDebugInfo = !stdenv.hostPlatform.isStatic;