bazel: patch to fix for darwin sandbox
This commit is contained in:
@@ -211,6 +211,10 @@ stdenv.mkDerivation rec {
|
||||
src = ../bazel_rc.patch;
|
||||
bazelSystemBazelRCPath = bazelRC;
|
||||
})
|
||||
|
||||
# disable suspend detection during a build inside Nix as this is
|
||||
# not available inside the darwin sandbox
|
||||
../bazel_darwin_sandbox.patch
|
||||
] ++ lib.optional enableNixHacks ../nix-hacks.patch;
|
||||
|
||||
|
||||
|
||||
@@ -246,6 +246,10 @@ stdenv.mkDerivation rec {
|
||||
src = ../bazel_rc.patch;
|
||||
bazelSystemBazelRCPath = bazelRC;
|
||||
})
|
||||
|
||||
# disable suspend detection during a build inside Nix as this is
|
||||
# not available inside the darwin sandbox
|
||||
../bazel_darwin_sandbox.patch
|
||||
] ++ lib.optional enableNixHacks ../nix-hacks.patch;
|
||||
|
||||
|
||||
|
||||
@@ -208,6 +208,10 @@ stdenv.mkDerivation rec {
|
||||
src = ../bazel_rc.patch;
|
||||
bazelSystemBazelRCPath = bazelRC;
|
||||
})
|
||||
|
||||
# disable suspend detection during a build inside Nix as this is
|
||||
# not available inside the darwin sandbox
|
||||
../bazel_darwin_sandbox.patch
|
||||
] ++ lib.optional enableNixHacks ../nix-hacks.patch;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
diff -ru a/src/main/native/unix_jni_darwin.cc b/src/main/native/unix_jni_darwin.cc
|
||||
--- a/src/main/native/unix_jni_darwin.cc 1980-01-01 00:00:00.000000000 -0500
|
||||
+++ b/src/main/native/unix_jni_darwin.cc 2021-11-27 20:35:29.000000000 -0500
|
||||
@@ -270,6 +270,7 @@
|
||||
}
|
||||
|
||||
int portable_suspend_count() {
|
||||
+ if (getenv("NIX_BUILD_TOP")) return 0;
|
||||
static dispatch_once_t once_token;
|
||||
static SuspendState suspend_state;
|
||||
dispatch_once(&once_token, ^{
|
||||
Reference in New Issue
Block a user