From a8f616d11c6df6677b940cdb0c8945c5c1b0998e Mon Sep 17 00:00:00 2001 From: Harsh Modi Date: Fri, 18 Aug 2023 22:10:46 -0700 Subject: [PATCH] bazel_6: Add diffutils and gnupatch to initialEnvironment Nix's version of bazel has custom patches to make bazel more hermetic when used with nix. One of those is limiting the default environment of Bash. However, this default environment is insufficient because lots of programs rely on diff being in the path like buildifier, golangci-lint, and other things since golang diff implementations aren't very good. Ideally we'd include "diffutils" as part of this list for rules that assume the presence of "diff" and don't allow nice knobs to configure otherwise. Furthermore, bazel has a lot of internal facilities that utilize patch (like when downloading workspaces, we have the option of patching them), so include gnupatch as well. Fixes #249846 --- .../development/tools/build-managers/bazel/bazel_6/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix index fca02e80ee50..545236b561c8 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix @@ -4,6 +4,7 @@ , bazel_self , lr, xe, zip, unzip, bash, writeCBin, coreutils , which, gawk, gnused, gnutar, gnugrep, gzip, findutils +, diffutils, gnupatch # updater , python3, writeScript # Apple dependencies @@ -110,10 +111,12 @@ let [ bash coreutils + diffutils file findutils gawk gnugrep + gnupatch gnused gnutar gzip