bazel_7: fix darwin compilation with CLang 16 & recent nixpkgs/master

Workaround for #166205 similar to
https://github.com/NixOS/nixpkgs/commit/51451ac4069e18b5813b38d57cb68cd72b7ec51e

And warning fix similar to `bazel_6` fix for
```
external/upb~0.0.0-20220923-a547704/upb/mini_table.c:634:14: error: defining a type within '__builtin_offsetof' is a Clang extension [-Werror,-Wgnu-offsetof-extensions]
UPB_ASSERT(UPB_ALIGN_OF(upb_StringView) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

authored by Dmitry Ivankov and committed by Guillaume Maudoux 306e8eaf 4d54ca89

+5 -1
+5 -1
pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
··· 270 270 271 271 postPatch = 272 272 let 273 + # Workaround for https://github.com/NixOS/nixpkgs/issues/166205 274 + nixpkgs166205ldflag = lib.optionalString stdenv.cc.isClang "-l${stdenv.cc.libcxx.cxxabi.libName}"; 273 275 darwinPatches = '' 274 276 bazelLinkFlags () { 275 277 eval set -- "$NIX_LDFLAGS" ··· 284 286 285 287 # Framework search paths aren't added by bintools hook 286 288 # https://github.com/NixOS/nixpkgs/pull/41914 287 - export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks -F${IOKit}/Library/Frameworks" 289 + export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks -F${IOKit}/Library/Frameworks ${nixpkgs166205ldflag}" 288 290 289 291 # libcxx includes aren't added by libcxx hook 290 292 # https://github.com/NixOS/nixpkgs/pull/41589 291 293 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1" 294 + # for CLang 16 compatibility in external/upb dependency 295 + export NIX_CFLAGS_COMPILE+=" -Wno-gnu-offsetof-extensions" 292 296 293 297 # This variable is used by bazel to propagate env vars for homebrew, 294 298 # which is exactly what we need too.