bazel_6: Enable local networking for tests on Darwin

This commit is contained in:
Claudio 2024-02-19 14:03:15 +01:00 committed by Claudio Bley
parent a75d0a734f
commit 4f857cd1de
1 changed files with 5 additions and 1 deletions

View File

@ -310,7 +310,11 @@ stdenv.mkDerivation rec {
bazelTest = { name, bazelScript, workspaceDir, bazelPkg, buildInputs ? [] }:
let
be = extracted bazelPkg;
in runLocal name { inherit buildInputs; } (
in runLocal name {
inherit buildInputs;
# Necessary for the tests to pass on Darwin with sandbox enabled.
__darwinAllowLocalNetworking = true;
} (
# skip extraction caching on Darwin, because nobody knows how Darwin works
(lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
# set up home with pre-unpacked bazel