summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPhilip Patsch <philip.patsch@tweag.io>2018-08-28 13:31:41 +0200
committerProfpatsch <mail@profpatsch.de>2018-08-28 16:12:53 +0200
commit91a876e06f7c2c573b774dd640bdf163127eae0b (patch)
treec1797a95445c5fa254dfe40ad1f0995a73ddfa45 /pkgs
parent6225ec07dd3dfcbadd25b0e19025dc9f8bdb69f3 (diff)
downloadnixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.tar
nixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.tar.gz
nixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.tar.bz2
nixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.tar.lz
nixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.tar.xz
nixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.tar.zst
nixlib-91a876e06f7c2c573b774dd640bdf163127eae0b.zip
bazel: add upstream patch of perl replacement
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index 72903ad8a5d0..6a25aef8b36a 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, runCommand, makeWrapper
+{ stdenv, lib, fetchurl, fetchpatch, runCommand, makeWrapper
 , jdk, zip, unzip, bash, writeCBin, coreutils
 , which, python, perl, gnused, gnugrep, findutils
 # Always assume all markers valid (don't redownload dependencies).
@@ -45,7 +45,14 @@ stdenv.mkDerivation rec {
 
   sourceRoot = ".";
 
-  patches = lib.optional enableNixHacks ./nix-hacks.patch;
+  patches =
+    lib.optional enableNixHacks ./nix-hacks.patch
+    # patch perl out of the bash completions
+    # should land in 0.18
+    ++ [(fetchpatch {
+           url = "https://github.com/bazelbuild/bazel/commit/27be70979b54d7510bf401d9581fb4075737ef34.patch";
+           sha256 = "04rip46lnibrsdyzjpi29wf444b49cbwb1xjcbrr3kdqsdj4d8h5";
+       })];
 
   # Bazel expects several utils to be available in Bash even without PATH. Hence this hack.
 
@@ -139,11 +146,6 @@ 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