diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 27ec84f861e8..8d4b95c8808e 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, runCommand, makeWrapper , jdk, zip, unzip, bash, writeCBin, coreutils -, which, python, gnused, gnugrep, findutils +, which, python, perl, gnused, gnugrep, findutils # Always assume all markers valid (don't redownload dependencies). # Also, don't clean up environment variables. , enableNixHacks ? false @@ -139,6 +139,11 @@ stdenv.mkDerivation rec { cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash + # the bash completion requires perl + # https://github.com/bazelbuild/bazel/issues/5943 + substituteInPlace scripts/bazel-complete-template.bash \ + --replace "perl" "${perl}/bin/perl" + patchShebangs . ''; in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches