bazel: Wrap so java is present at runtime

Bazel can't start up without javac in $PATH.
This commit is contained in:
Benjamin Staffin 2017-02-28 12:44:44 -05:00
parent 14ef7c0c59
commit 7c17c10bab

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, jdk, zip, unzip, which, bash, binutils, coreutils }:
{ stdenv, fetchurl, jdk, zip, unzip, which, bash, binutils, coreutils, makeWrapper }:
stdenv.mkDerivation rec {
@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
unzip
which
binutils
makeWrapper
];
# These must be propagated since the dependency is hidden in a compressed
@ -83,6 +84,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
mv output/bazel $out/bin
wrapProgram "$out/bin/bazel" --prefix PATH : "${jdk}/bin"
'';
dontStrip = true;