From ec3c3c824eb5bbdc2baeabff6b221b68e7166160 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 21 Aug 2018 14:08:18 +0200 Subject: [PATCH] bazel: substitute the perl path for bash completions --- pkgs/development/tools/build-managers/bazel/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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