Merge pull request #278802 from reckenrode/nix-test-fix

nix: fix installCheckPhase crashes on Darwin

authored by K900 and committed by GitHub ea735236 7c48a663

+5
+5
pkgs/tools/package-management/nix/common.nix
··· 213 preInstallCheck = lib.optionalString stdenv.isDarwin '' 214 export TMPDIR=$NIX_BUILD_TOP 215 '' 216 # See https://github.com/NixOS/nix/issues/5687 217 + lib.optionalString (atLeast25 && stdenv.isDarwin) '' 218 echo "exit 99" > tests/gc-non-blocking.sh
··· 213 preInstallCheck = lib.optionalString stdenv.isDarwin '' 214 export TMPDIR=$NIX_BUILD_TOP 215 '' 216 + # Prevent crashes in libcurl due to invoking Objective-C `+initialize` methods after `fork`. 217 + # See http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. 218 + + lib.optionalString stdenv.isDarwin '' 219 + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes 220 + '' 221 # See https://github.com/NixOS/nix/issues/5687 222 + lib.optionalString (atLeast25 && stdenv.isDarwin) '' 223 echo "exit 99" > tests/gc-non-blocking.sh