Merge pull request #46465 from uri-canva/bazel-jdk10

bazel: add bazel_jdk10 variant
This commit is contained in:
Jörg Thalheim 2018-09-10 16:27:01 +01:00 committed by GitHub
commit 2d4dcefd9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -1,11 +1,13 @@
{ stdenv, lib, fetchurl, fetchpatch, runCommand, makeWrapper
, jdk, zip, unzip, bash, writeCBin, coreutils
, which, python, perl, gnused, gnugrep, findutils
# Apple dependencies
, cctools, clang, libcxx, CoreFoundation, CoreServices, Foundation
# Allow to independently override the jdks used to build and run respectively
, buildJdk ? jdk, runJdk ? jdk
# Always assume all markers valid (don't redownload dependencies).
# Also, don't clean up environment variables.
, enableNixHacks ? false
# Apple dependencies
, cctools, clang, libcxx, CoreFoundation, CoreServices, Foundation
}:
let
@ -152,7 +154,7 @@ stdenv.mkDerivation rec {
+ genericPatches;
buildInputs = [
jdk
buildJdk
];
nativeBuildInputs = [
@ -190,7 +192,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
mv output/bazel $out/bin
wrapProgram "$out/bin/bazel" --set JAVA_HOME "${jdk}"
wrapProgram "$out/bin/bazel" --set JAVA_HOME "${runJdk}"
mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions
mv output/bazel-complete.bash $out/share/bash-completion/completions/bazel
cp scripts/zsh_completion/_bazel $out/share/zsh/site-functions/

View file

@ -7961,6 +7961,11 @@ with pkgs;
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
};
bazel_jdk10 = callPackage ../development/tools/build-managers/bazel {
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
runJdk = jdk10;
};
bazel-buildtools = callPackage ../development/tools/build-managers/bazel/buildtools { };
buildifier = bazel-buildtools;