From de41595957522cd57adaed13cc5fae19fcc09435 Mon Sep 17 00:00:00 2001 From: George Huebner Date: Mon, 13 Jul 2026 11:16:02 -0700 Subject: [PATCH] verible: fix hash mismatch and build in bazel sandbox on darwin (cherry picked from commit 7ddbc35e37b7eb03d7b6436ad43fd760768c1e5b) --- pkgs/by-name/ve/verible/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ve/verible/package.nix b/pkgs/by-name/ve/verible/package.nix index 591a1bb09759..d4a04d6ab80d 100644 --- a/pkgs/by-name/ve/verible/package.nix +++ b/pkgs/by-name/ve/verible/package.nix @@ -30,6 +30,8 @@ buildBazelPackage { # a build string shown in the tools --version output. # If env variables not set, it would attempt to extract it from .git/. inherit GIT_DATE GIT_VERSION; + ${if stdenv.hostPlatform.isDarwin then "NIX_CFLAGS_COMPILE" else null} = + "-mmacos-version-min=10.15"; } // lib.optionalAttrs stdenv.hostPlatform.isDarwin { LIBTOOL = "${cctools}/bin/libtool"; @@ -57,12 +59,15 @@ buildBazelPackage { fetchAttrs = { preInstall = '' rm -rf $bazelOut/external/rules_shell~~sh_configure~local_config_shell + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + find $bazelOut/external/abseil-cpp~ -type f -name BUILD.bazel -exec sed -i -e 's/"layering_check",//g' {} \; ''; hash = { aarch64-linux = "sha256-KsXrwRIiCft/WaT0uj28gOj5ahhTKxcaiosbY7Mo3JY="; x86_64-linux = "sha256-X7/W2iOTXruRO2wx9J5tGYvy2IuZ6mXiRAmUI5Eq9Vc="; - aarch64-darwin = "sha256-Zn22un/KaHdTEA/ucaentR7t/krmnZQk3A+jfbPVYnA="; + aarch64-darwin = "sha256-XGDsePwK70cdF9tgtykezlJdbGnnwNSbeZlpM67PhPc="; } .${system} or (throw "No hash for system: ${system}"); };