Merge pull request #23288 from benley/bazel
Bazel: wrap to keep java available at runtime
This commit is contained in:
commit
6fd4486de5
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
|
|||||||
unzip
|
unzip
|
||||||
which
|
which
|
||||||
binutils
|
binutils
|
||||||
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
# These must be propagated since the dependency is hidden in a compressed
|
# These must be propagated since the dependency is hidden in a compressed
|
||||||
@ -75,13 +76,15 @@ stdenv.mkDerivation rec {
|
|||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
export TEST_TMPDIR=$(pwd)
|
export TEST_TMPDIR=$(pwd)
|
||||||
./output/bazel test --test_output=errors examples/cpp:hello-success_test
|
./output/bazel test --test_output=errors \
|
||||||
./output/bazel test --test_output=errors examples/java-native/src/test/java/com/example/myproject:hello
|
examples/cpp:hello-success_test \
|
||||||
|
examples/java-native/src/test/java/com/example/myproject:hello
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
mv output/bazel $out/bin
|
mv output/bazel $out/bin
|
||||||
|
wrapProgram "$out/bin/bazel" --prefix PATH : "${jdk}/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user