bazel: substitute the perl path for bash completions

This commit is contained in:
Profpatsch 2018-08-21 14:08:18 +02:00
parent c53e004257
commit ec3c3c824e

View File

@ -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