bazel: patch to fix for darwin sandbox

+23
+4
pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
··· 211 src = ../bazel_rc.patch; 212 bazelSystemBazelRCPath = bazelRC; 213 }) 214 ] ++ lib.optional enableNixHacks ../nix-hacks.patch; 215 216
··· 211 src = ../bazel_rc.patch; 212 bazelSystemBazelRCPath = bazelRC; 213 }) 214 + 215 + # disable suspend detection during a build inside Nix as this is 216 + # not available inside the darwin sandbox 217 + ../bazel_darwin_sandbox.patch 218 ] ++ lib.optional enableNixHacks ../nix-hacks.patch; 219 220
+4
pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
··· 246 src = ../bazel_rc.patch; 247 bazelSystemBazelRCPath = bazelRC; 248 }) 249 ] ++ lib.optional enableNixHacks ../nix-hacks.patch; 250 251
··· 246 src = ../bazel_rc.patch; 247 bazelSystemBazelRCPath = bazelRC; 248 }) 249 + 250 + # disable suspend detection during a build inside Nix as this is 251 + # not available inside the darwin sandbox 252 + ../bazel_darwin_sandbox.patch 253 ] ++ lib.optional enableNixHacks ../nix-hacks.patch; 254 255
+4
pkgs/development/tools/build-managers/bazel/bazel_5/default.nix
··· 208 src = ../bazel_rc.patch; 209 bazelSystemBazelRCPath = bazelRC; 210 }) 211 ] ++ lib.optional enableNixHacks ../nix-hacks.patch; 212 213
··· 208 src = ../bazel_rc.patch; 209 bazelSystemBazelRCPath = bazelRC; 210 }) 211 + 212 + # disable suspend detection during a build inside Nix as this is 213 + # not available inside the darwin sandbox 214 + ../bazel_darwin_sandbox.patch 215 ] ++ lib.optional enableNixHacks ../nix-hacks.patch; 216 217
+11
pkgs/development/tools/build-managers/bazel/bazel_darwin_sandbox.patch
···
··· 1 + diff -ru a/src/main/native/unix_jni_darwin.cc b/src/main/native/unix_jni_darwin.cc 2 + --- a/src/main/native/unix_jni_darwin.cc 1980-01-01 00:00:00.000000000 -0500 3 + +++ b/src/main/native/unix_jni_darwin.cc 2021-11-27 20:35:29.000000000 -0500 4 + @@ -270,6 +270,7 @@ 5 + } 6 + 7 + int portable_suspend_count() { 8 + + if (getenv("NIX_BUILD_TOP")) return 0; 9 + static dispatch_once_t once_token; 10 + static SuspendState suspend_state; 11 + dispatch_once(&once_token, ^{