@@ -1,6 +1,6 @@
11{ stdenv, lib, fetchurl, runCommand, makeWrapper
22, jdk, zip, unzip, bash, writeCBin, coreutils
3−, which, python, gnused, gnugrep, findutils
3+, which, python, perl, gnused, gnugrep, findutils
44# Always assume all markers valid (don't redownload dependencies).
55# Also, don't clean up environment variables.
66, enableNixHacks ? false
@@ -139,6 +139,11 @@ stdenv.mkDerivation rec {
139139 cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp
140140 mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash
141141
142+ # the bash completion requires perl
143+ # https://github.com/bazelbuild/bazel/issues/5943
144+ substituteInPlace scripts/bazel-complete-template.bash \
145+ --replace "perl" "${perl}/bin/perl"
146+
142147 patchShebangs .
143148 '';
144149 in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches