From ed55d1f607ddc5e35a24b8dbf90283f0c6f1240d Mon Sep 17 00:00:00 2001 From: r2r-dev <39031033+r2r-dev@users.noreply.github.com> Date: Tue, 25 Jan 2022 12:23:48 +0100 Subject: [PATCH] bazel_5: Explicitly add a dependency on bazel-rc Co-authored-by: Uri Baghin --- .../tools/build-managers/bazel/bazel_5/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix index 3148c24c5b0a..8770174ab26c 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix @@ -655,6 +655,10 @@ stdenv.mkDerivation rec { postFixup = '' mkdir -p $out/nix-support echo "${defaultShellPath}" >> $out/nix-support/depends + # The string literal specifying the path to the bazel-rc file is sometimes + # stored non-contiguously in the binary due to gcc optimisations, which leads + # Nix to miss the hash when scanning for dependencies + echo "${bazelRC}" >> $out/nix-support/depends '' + lib.optionalString stdenv.isDarwin '' echo "${cctools}" >> $out/nix-support/depends '';