From ce7e57ab48c970569bcef53ce92630af9b362785 Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 27 Dec 2025 22:38:51 +0800 Subject: [PATCH] bazel_7: fix build with gcc 15 Just fixing build now to avoid making more non-trivial changes --- pkgs/by-name/ba/bazel_7/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/ba/bazel_7/package.nix b/pkgs/by-name/ba/bazel_7/package.nix index a30d5ad78086..f5a450dc6176 100644 --- a/pkgs/by-name/ba/bazel_7/package.nix +++ b/pkgs/by-name/ba/bazel_7/package.nix @@ -6,6 +6,7 @@ makeWrapper, writeTextFile, replaceVars, + fetchpatch, writeShellApplication, makeBinaryWrapper, autoPatchelfHook, @@ -386,6 +387,12 @@ stdenv.mkDerivation rec { (replaceVars ./bazel_rc.patch { bazelSystemBazelRCPath = bazelRC; }) + + # Fix build with gcc 15 by adding missing headers + (fetchpatch { + url = "https://github.com/bazelbuild/bazel/commit/1d206cac050b6c7d9ce65403e6a9909a49bfe4bc.patch"; + hash = "sha256-Tg5o1Va7dd5hvXbWhZiog+VtuiqngqbbYOkCafVudDs="; + }) ] # See enableNixHacks argument above. ++ lib.optional enableNixHacks ./nix-build-bazel-package-hacks.patch;