From 14ef7c0c59be348c2e27c2d0d5d4ca175962e519 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Tue, 28 Feb 2017 12:21:52 -0500 Subject: [PATCH 1/2] bazel: consolidate bazel test invocations This way it can run them in parallel. --- pkgs/development/tools/build-managers/bazel/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 25378135d3d..e40e78427c6 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -75,8 +75,9 @@ stdenv.mkDerivation rec { doCheck = true; checkPhase = '' export TEST_TMPDIR=$(pwd) - ./output/bazel test --test_output=errors examples/cpp:hello-success_test - ./output/bazel test --test_output=errors examples/java-native/src/test/java/com/example/myproject:hello + ./output/bazel test --test_output=errors \ + examples/cpp:hello-success_test \ + examples/java-native/src/test/java/com/example/myproject:hello ''; installPhase = '' From 7c17c10bab7ff0319c983828032d6a10b07b4faa Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Tue, 28 Feb 2017 12:44:44 -0500 Subject: [PATCH 2/2] bazel: Wrap so java is present at runtime Bazel can't start up without javac in $PATH. --- pkgs/development/tools/build-managers/bazel/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index e40e78427c6..a8ad08feec1 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -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;