Skip to content

Commit 855741a

Browse files
committed
package.nix: Apply OBJC_DISABLE_INITIALIZE_FORK_SAFETY workaround
1 parent 8cda266 commit 855741a

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

package.nix

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,15 @@ in {
349349

350350
# Needed for tests if we are not doing a build, but testing existing
351351
# built Nix.
352-
preInstallCheck = lib.optionalString (! doBuild) ''
353-
mkdir -p src/nix-channel
354-
'';
352+
preInstallCheck =
353+
lib.optionalString (! doBuild) ''
354+
mkdir -p src/nix-channel
355+
''
356+
# See https://github.com/NixOS/nix/issues/2523
357+
# Occurs often in tests since https://github.com/NixOS/nix/pull/9900
358+
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
359+
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
360+
'';
355361

356362
separateDebugInfo = !stdenv.hostPlatform.isStatic;
357363

0 commit comments

Comments
 (0)