@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, jdk, zip, unzip, which, bash, binutils, coreutils }:
1+{ stdenv, fetchurl, jdk, zip, unzip, which, bash, binutils, coreutils, makeWrapper }:
22
33stdenv.mkDerivation rec {
44
@@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
5151 unzip
5252 which
5353 binutils
54+ makeWrapper
5455 ];
5556
5657 # These must be propagated since the dependency is hidden in a compressed
@@ -75,13 +76,15 @@ stdenv.mkDerivation rec {
7576 doCheck = true;
7677 checkPhase = ''
7778 export TEST_TMPDIR=$(pwd)
78− ./output/bazel test --test_output=errors examples/cpp:hello-success_test
79− ./output/bazel test --test_output=errors examples/java-native/src/test/java/com/example/myproject:hello
79+ ./output/bazel test --test_output=errors \
80+ examples/cpp:hello-success_test \
81+ examples/java-native/src/test/java/com/example/myproject:hello
8082 '';
8183
8284 installPhase = ''
8385 mkdir -p $out/bin
8486 mv output/bazel $out/bin
87+ wrapProgram "$out/bin/bazel" --prefix PATH : "${jdk}/bin"
8588 '';
8689
8790 dontStrip = true;