mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
bazel 0.27.0 --> 0.28.1 (#2570)
This commit is contained in:
parent
b4dc886fa8
commit
64e8f83af4
@ -1,12 +1,12 @@
|
||||
{
|
||||
"homepage": "https://bazel.build",
|
||||
"version": "0.27.0",
|
||||
"version": "0.28.1",
|
||||
"license": "Apache-2.0",
|
||||
"bin": "bazel.exe",
|
||||
"architecture": {
|
||||
"64bit": {
|
||||
"url": "https://github.com/bazelbuild/bazel/releases/download/0.27.0/bazel-0.27.0-windows-x86_64.zip",
|
||||
"hash": "6d496005bf02151b983aed1320f1728aca461de2246ee50cbcc56886078b813e"
|
||||
"url": "https://github.com/bazelbuild/bazel/releases/download/0.28.1/bazel-0.28.1-windows-x86_64.zip",
|
||||
"hash": "2cb949887f0c8aa5039bb39f52a13a9a13cfcd019d42f65ee16dd134d41c0f72"
|
||||
}
|
||||
},
|
||||
"depends": [
|
||||
|
@ -1,9 +1,11 @@
|
||||
{ stdenv, callPackage, lib, fetchurl, runCommand, runCommandCC, makeWrapper
|
||||
, diffutils, getopt, perl, postgresql
|
||||
{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub
|
||||
, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs
|
||||
# this package (through the fixpoint glass)
|
||||
, bazel
|
||||
, lr, xe, zip, unzip, bash, writeCBin, coreutils
|
||||
, which, gawk, gnused, gnutar, gnugrep, gzip, findutils
|
||||
# XXX: Modified relative to upstream Nix expression.
|
||||
, diffutils, getopt, perl, postgresql
|
||||
# updater
|
||||
, python3, writeScript
|
||||
# Apple dependencies
|
||||
@ -12,19 +14,21 @@
|
||||
, buildJdk, runJdk
|
||||
, buildJdkName
|
||||
, runtimeShell
|
||||
# Always assume all markers valid (don't redownload dependencies).
|
||||
# Also, don't clean up environment variables.
|
||||
# Downstream packages for tests
|
||||
, bazel-watcher
|
||||
# Always assume all markers valid (this is needed because we remove markers; they are non-deterministic).
|
||||
# Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers).
|
||||
, enableNixHacks ? false
|
||||
, gcc-unwrapped
|
||||
, autoPatchelfHook
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.27.0";
|
||||
version = "0.28.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
|
||||
sha256 = "0yn662dzgfr8ls4avfl12k5sr4f210bab12wml18bh4sjlxhs263";
|
||||
sha256 = "0503fax70w7h6v00mkrrrgf1m5n0vkjqs76lyg95alhzc4yldsic";
|
||||
};
|
||||
|
||||
# Update with `eval $(nix-build -A bazel.updater)`,
|
||||
@ -34,7 +38,6 @@ let
|
||||
let
|
||||
srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
|
||||
toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
|
||||
name = d.name;
|
||||
urls = d.urls;
|
||||
sha256 = d.sha256;
|
||||
});
|
||||
@ -43,12 +46,13 @@ let
|
||||
srcs.io_bazel_skydoc
|
||||
srcs.bazel_skylib
|
||||
srcs.io_bazel_rules_sass
|
||||
srcs.platforms
|
||||
(if stdenv.hostPlatform.isDarwin
|
||||
then srcs.${"java_tools_javac11_darwin-v2.0.zip"}
|
||||
else srcs.${"java_tools_javac11_linux-v2.0.zip"})
|
||||
srcs.${"coverage_output_generator-v1.0.zip"}
|
||||
srcs.build_bazel_rules_nodejs
|
||||
srcs.${"android_tools_pkg-0.4.tar.gz"}
|
||||
srcs.${"android_tools_pkg-0.7.tar.gz"}
|
||||
]);
|
||||
|
||||
distDir = runCommand "bazel-deps" {} ''
|
||||
@ -85,7 +89,8 @@ let
|
||||
# )
|
||||
#
|
||||
# XXX: Modified relative to upstream Nix expression.
|
||||
[ bash coreutils diffutils findutils gawk gnugrep gnutar gnused gzip perl which unzip getopt postgresql ];
|
||||
[ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip
|
||||
diffutils getopt perl postgresql ];
|
||||
|
||||
# Java toolchain used for the build and tests
|
||||
javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}";
|
||||
@ -96,8 +101,7 @@ let
|
||||
# however it contains prebuilt java binaries, with wrong interpreter
|
||||
# and libraries path.
|
||||
# We prefetch it, patch it, and override it in a global bazelrc.
|
||||
system = if stdenv.hostPlatform.isDarwin
|
||||
then "darwin" else "linux";
|
||||
system = if stdenv.hostPlatform.isDarwin then "darwin" else "linux";
|
||||
|
||||
remote_java_tools = stdenv.mkDerivation {
|
||||
name = "remote_java_tools_${system}";
|
||||
@ -135,7 +139,10 @@ stdenv.mkDerivation rec {
|
||||
sourceRoot = ".";
|
||||
|
||||
patches = [
|
||||
./python-stub-path-fix.patch
|
||||
# On Darwin, the last argument to gcc is coming up as an empty string. i.e: ''
|
||||
# This is breaking the build of any C target. This patch removes the last
|
||||
# argument if it's found to be an empty string.
|
||||
./trim-last-argument-to-gcc-if-empty.patch
|
||||
] ++ lib.optional enableNixHacks ./nix-hacks.patch;
|
||||
|
||||
|
||||
@ -146,11 +153,16 @@ stdenv.mkDerivation rec {
|
||||
# in the nixpkgs checkout root to exercise them locally.
|
||||
passthru.tests =
|
||||
let
|
||||
runLocal = name: attrs: script: runCommandCC name ({
|
||||
runLocal = name: attrs: script:
|
||||
let
|
||||
attrs' = removeAttrs attrs [ "buildInputs" ];
|
||||
buildInputs = [ python3 ] ++ (attrs.buildInputs or []);
|
||||
in
|
||||
runCommandCC name ({
|
||||
inherit buildInputs;
|
||||
preferLocalBuild = true;
|
||||
meta.platforms = platforms;
|
||||
buildInputs = [ python3 ];
|
||||
} // attrs) script;
|
||||
} // attrs') script;
|
||||
|
||||
# bazel wants to extract itself into $install_dir/install every time it runs,
|
||||
# so let’s do that only once.
|
||||
@ -170,10 +182,10 @@ stdenv.mkDerivation rec {
|
||||
cp -R ${install_dir} $out
|
||||
'';
|
||||
|
||||
bazelTest = { name, bazelScript, workspaceDir, bazelPkg }:
|
||||
bazelTest = { name, bazelScript, workspaceDir, bazelPkg, buildInputs ? [] }:
|
||||
let
|
||||
be = extracted bazelPkg;
|
||||
in runLocal name {} (
|
||||
in runLocal name { inherit buildInputs; } (
|
||||
# skip extraction caching on Darwin, because nobody knows how Darwin works
|
||||
(lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
# set up home with pre-unpacked bazel
|
||||
@ -200,12 +212,38 @@ stdenv.mkDerivation rec {
|
||||
'');
|
||||
|
||||
bazelWithNixHacks = bazel.override { enableNixHacks = true; };
|
||||
in {
|
||||
pythonBinPathWithoutNixHacks = callPackage ./python-bin-path-test.nix{ inherit runLocal bazelTest; };
|
||||
bashToolsWithoutNixHacks = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest; };
|
||||
|
||||
pythonBinPathWithNixHacks = callPackage ./python-bin-path-test.nix{ inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
|
||||
bazel-examples = fetchFromGitHub {
|
||||
owner = "bazelbuild";
|
||||
repo = "examples";
|
||||
rev = "5d8c8961a2516ebf875787df35e98cadd08d43dc";
|
||||
sha256 = "03c1bwlq5bs3hg96v4g4pg2vqwhqq6w538h66rcpw02f83yy7fs8";
|
||||
};
|
||||
|
||||
in {
|
||||
bashTools = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest; };
|
||||
cpp = callPackage ./cpp-test.nix { inherit runLocal bazelTest bazel-examples; };
|
||||
java = callPackage ./java-test.nix { inherit runLocal bazelTest bazel-examples; };
|
||||
protobuf = callPackage ./protobuf-test.nix { inherit runLocal bazelTest; };
|
||||
pythonBinPath = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest; };
|
||||
|
||||
bashToolsWithNixHacks = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
|
||||
|
||||
cppWithNixHacks = callPackage ./cpp-test.nix { inherit runLocal bazelTest bazel-examples; bazel = bazelWithNixHacks; };
|
||||
javaWithNixHacks = callPackage ./java-test.nix { inherit runLocal bazelTest bazel-examples; bazel = bazelWithNixHacks; };
|
||||
protobufWithNixHacks = callPackage ./protobuf-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
|
||||
pythonBinPathWithNixHacks = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
|
||||
|
||||
# downstream packages using buildBazelPackage
|
||||
# fixed-output hashes of the fetch phase need to be spot-checked manually
|
||||
downstream = recurseIntoAttrs ({
|
||||
inherit bazel-watcher;
|
||||
}
|
||||
# dm-sonnet is only packaged for linux
|
||||
// (lib.optionalAttrs stdenv.isLinux {
|
||||
# TODO(timokau) dm-sonnet is broken currently
|
||||
# dm-sonnet-linux = python3.pkgs.dm-sonnet;
|
||||
}));
|
||||
};
|
||||
|
||||
# update the list of workspace dependencies
|
||||
@ -222,7 +260,6 @@ stdenv.mkDerivation rec {
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
# Bazel expects several utils to be available in Bash even without PATH. Hence this hack.
|
||||
|
||||
customBash = writeCBin "bash" ''
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -290,9 +327,8 @@ stdenv.mkDerivation rec {
|
||||
genericPatches = ''
|
||||
# Substitute python's stub shebang to plain python path. (see TODO add pr URL)
|
||||
# See also `postFixup` where python is added to $out/nix-support
|
||||
substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\
|
||||
--replace "/usr/bin/env python" "${python3}/bin/python" \
|
||||
--replace "NIX_STORE_PYTHON_PATH" "${python3}/bin/python" \
|
||||
substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt \
|
||||
--replace "#!/usr/bin/env python" "#!${python3}/bin/python"
|
||||
|
||||
# md5sum is part of coreutils
|
||||
sed -i 's|/sbin/md5|md5sum|' \
|
||||
@ -312,6 +348,11 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace tools/build_rules/test_rules.bzl \
|
||||
--replace /bin/bash ${customBash}/bin/bash
|
||||
|
||||
for i in $(find tools/cpp/ -type f)
|
||||
do
|
||||
substituteInPlace $i \
|
||||
--replace /bin/bash ${customBash}/bin/bash
|
||||
done
|
||||
|
||||
# Fixup scripts that generate scripts. Not fixed up by patchShebangs below.
|
||||
substituteInPlace scripts/bootstrap/compile.sh \
|
||||
@ -319,8 +360,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# add nix environment vars to .bazelrc
|
||||
cat >> .bazelrc <<EOF
|
||||
build --experimental_distdir=${distDir}
|
||||
fetch --experimental_distdir=${distDir}
|
||||
build --distdir=${distDir}
|
||||
fetch --distdir=${distDir}
|
||||
build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')"
|
||||
build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')"
|
||||
build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')"
|
||||
@ -436,24 +477,8 @@ stdenv.mkDerivation rec {
|
||||
installCheckPhase = ''
|
||||
export TEST_TMPDIR=$(pwd)
|
||||
|
||||
tar xf ${srcDepsSet.io_bazel_skydoc} -C $TEST_TMPDIR
|
||||
mv $(ls | grep skydoc-) io_bazel_skydoc
|
||||
|
||||
tar xf ${srcDepsSet.bazel_skylib} -C $TEST_TMPDIR
|
||||
mv $(ls | grep bazel-skylib-) bazel_skylib
|
||||
|
||||
tar xf ${srcDepsSet.io_bazel_rules_sass} -C $TEST_TMPDIR
|
||||
mv $(ls | grep rules_sass-) rules_sass
|
||||
|
||||
unzip ${srcDepsSet.build_bazel_rules_nodejs} -d $TEST_TMPDIR
|
||||
mv rules_nodejs-0.16.2 build_bazel_rules_nodejs
|
||||
|
||||
hello_test () {
|
||||
$out/bin/bazel test \
|
||||
--override_repository=io_bazel_skydoc=$TEST_TMPDIR/io_bazel_skydoc \
|
||||
--override_repository=bazel_skylib=$TEST_TMPDIR/bazel_skylib \
|
||||
--override_repository=io_bazel_rules_sass=$TEST_TMPDIR/rules_sass \
|
||||
--override_repository=build_bazel_rules_nodejs=$TEST_TMPDIR/build_bazel_rules_nodejs \
|
||||
$out/bin/bazel test --distdir=${distDir} \
|
||||
--test_output=errors \
|
||||
--java_toolchain='${javaToolchain}' \
|
||||
examples/cpp:hello-success_test \
|
||||
@ -484,6 +509,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
# Save paths to hardcoded dependencies so Nix can detect them.
|
||||
# XXX: Modified relative to upstream Nix expression.
|
||||
postFixup = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
|
||||
index dac21c9a83..69b11c283f 100644
|
||||
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
|
||||
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
|
||||
@@ -67,7 +67,7 @@ def FindPythonBinary(module_space):
|
||||
return os.path.join(module_space, PYTHON_BINARY)
|
||||
else:
|
||||
# Case 4: Path has to be looked up in the search path.
|
||||
- return SearchPath(PYTHON_BINARY)
|
||||
+ return "NIX_STORE_PYTHON_PATH"
|
||||
|
||||
def CreatePythonPathEntries(python_imports, module_space):
|
||||
parts = python_imports.split(':');
|
@ -7,12 +7,20 @@
|
||||
"https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip"
|
||||
]
|
||||
},
|
||||
"2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz": {
|
||||
"name": "2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz",
|
||||
"sha256": "4a1318fed4831697b83ce879b3ab70ae09592b167e5bda8edaff45132d1c3b3f",
|
||||
"1ca560df1cf6e280f987af2f8d08a5edc7ac6b54.tar.gz": {
|
||||
"name": "1ca560df1cf6e280f987af2f8d08a5edc7ac6b54.tar.gz",
|
||||
"sha256": "3ca1b3d453a977aeda60dd335feb812771addfd0d0c61751b34b9681aa4d6534",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz",
|
||||
"https://github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz"
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/1ca560df1cf6e280f987af2f8d08a5edc7ac6b54.tar.gz",
|
||||
"https://github.com/bazelbuild/skydoc/archive/1ca560df1cf6e280f987af2f8d08a5edc7ac6b54.tar.gz"
|
||||
]
|
||||
},
|
||||
"441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip": {
|
||||
"name": "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
|
||||
"sha256": "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
|
||||
"https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip"
|
||||
]
|
||||
},
|
||||
"8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz": {
|
||||
@ -23,11 +31,11 @@
|
||||
"https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz"
|
||||
]
|
||||
},
|
||||
"android_tools_pkg-0.4.tar.gz": {
|
||||
"name": "android_tools_pkg-0.4.tar.gz",
|
||||
"sha256": "331e7706f2bcae8a68057d8ddd3e3f1574bca26c67c65802fc4a8ac6164fa912",
|
||||
"android_tools_pkg-0.7.tar.gz": {
|
||||
"name": "android_tools_pkg-0.7.tar.gz",
|
||||
"sha256": "a8e48f2fdee2c34b31f45bd47ce050a75ac774f19e0a1f6694fa49fc11d88718",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.4.tar.gz"
|
||||
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.7.tar.gz"
|
||||
]
|
||||
},
|
||||
"bazel_j2objc": {
|
||||
@ -41,11 +49,11 @@
|
||||
},
|
||||
"bazel_rbe_toolchains": {
|
||||
"name": "bazel_rbe_toolchains",
|
||||
"sha256": "f575778fb1366718f5e1204200ecf35796c558998c15303945d351f0b42669e5",
|
||||
"strip_prefix": "bazel_rbe_toolchains-f50471a57cd05a313a953fa54756db6e8fd93673",
|
||||
"sha256": "e2b8644caa15235a488e831264e5dcb014e2cdf3b697319bc1e9d6b0fff0b4b9",
|
||||
"strip_prefix": "bazel_rbe_toolchains-01529a65d21abdf71635ff0c2472043a567ecded",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/github.com/buchgr/bazel_rbe_toolchains/archive/f50471a57cd05a313a953fa54756db6e8fd93673.tar.gz",
|
||||
"https://github.com/buchgr/bazel_rbe_toolchains/archive/f50471a57cd05a313a953fa54756db6e8fd93673.tar.gz"
|
||||
"https://mirror.bazel.build/github.com/buchgr/bazel_rbe_toolchains/archive/01529a65d21abdf71635ff0c2472043a567ecded.tar.gz",
|
||||
"https://github.com/buchgr/bazel_rbe_toolchains/archive/01529a65d21abdf71635ff0c2472043a567ecded.tar.gz"
|
||||
]
|
||||
},
|
||||
"bazel_skylib": {
|
||||
@ -127,11 +135,11 @@
|
||||
},
|
||||
"io_bazel_skydoc": {
|
||||
"name": "io_bazel_skydoc",
|
||||
"sha256": "4a1318fed4831697b83ce879b3ab70ae09592b167e5bda8edaff45132d1c3b3f",
|
||||
"strip_prefix": "skydoc-2d9566b21fbe405acf5f7bf77eda30df72a4744c",
|
||||
"sha256": "3ca1b3d453a977aeda60dd335feb812771addfd0d0c61751b34b9681aa4d6534",
|
||||
"strip_prefix": "skydoc-1ca560df1cf6e280f987af2f8d08a5edc7ac6b54",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz",
|
||||
"https://github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz"
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/1ca560df1cf6e280f987af2f8d08a5edc7ac6b54.tar.gz",
|
||||
"https://github.com/bazelbuild/skydoc/archive/1ca560df1cf6e280f987af2f8d08a5edc7ac6b54.tar.gz"
|
||||
]
|
||||
},
|
||||
"java_tools_javac11_darwin-v2.0.zip": {
|
||||
@ -169,6 +177,13 @@
|
||||
"https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11.zip"
|
||||
]
|
||||
},
|
||||
"java_tools_langtools_javac12": {
|
||||
"name": "java_tools_langtools_javac12",
|
||||
"sha256": "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip"
|
||||
]
|
||||
},
|
||||
"java_tools_langtools_javac9": {
|
||||
"name": "java_tools_langtools_javac9",
|
||||
"sha256": "3b6bbc47256acf2f61883901e2d4e3f9b292f5fe154a6912b928805de24cb864",
|
||||
@ -235,11 +250,27 @@
|
||||
]
|
||||
},
|
||||
"openjdk_linux_aarch64": {
|
||||
"downloaded_file_path": "zulu-linux-aarch64.tar.gz",
|
||||
"name": "openjdk_linux_aarch64",
|
||||
"sha256": "72e7843902b0395e2d30e1e9ad2a5f05f36a4bc62529828bcbc698d54aec6022",
|
||||
"sha256": "23c37c0c3a8fdcbc68e96e70ff5c5c020c14db76deaae9b547849afda4586e5e",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz",
|
||||
"http://openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz"
|
||||
"https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64-allmodules-c82eb4878c7dc829455caeb915affe36c89df06f-1561630858.tar.gz"
|
||||
]
|
||||
},
|
||||
"openjdk_linux_aarch64_minimal": {
|
||||
"downloaded_file_path": "zulu-linux-aarch64-minimal.tar.gz",
|
||||
"name": "openjdk_linux_aarch64_minimal",
|
||||
"sha256": "7af2583fe5ef0a781d4a9dca0c0160d42e7db1305ec1b66f98aa44c91cc875df",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64-minimal-c82eb4878c7dc829455caeb915affe36c89df06f-1561630858.tar.gz"
|
||||
]
|
||||
},
|
||||
"openjdk_linux_aarch64_vanilla": {
|
||||
"downloaded_file_path": "zulu-linux-aarch64-vanilla.tar.gz",
|
||||
"name": "openjdk_linux_aarch64_vanilla",
|
||||
"sha256": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz"
|
||||
]
|
||||
},
|
||||
"openjdk_linux_minimal": {
|
||||
@ -306,6 +337,15 @@
|
||||
"https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64.zip"
|
||||
]
|
||||
},
|
||||
"platforms": {
|
||||
"name": "platforms",
|
||||
"sha256": "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5",
|
||||
"strip_prefix": "platforms-441afe1bfdadd6236988e9cac159df6b5a9f5a98",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
|
||||
"https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip"
|
||||
]
|
||||
},
|
||||
"zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz": {
|
||||
"name": "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz",
|
||||
"sha256": "57fad3602e74c79587901d6966d3b54ef32cb811829a2552163185d5064fe9b5",
|
||||
@ -369,6 +409,13 @@
|
||||
"https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64.zip"
|
||||
]
|
||||
},
|
||||
"zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz": {
|
||||
"name": "zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz",
|
||||
"sha256": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz"
|
||||
]
|
||||
},
|
||||
"zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz": {
|
||||
"name": "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz",
|
||||
"sha256": "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87",
|
||||
|
37
nix/overrides/bazel/trim-last-argument-to-gcc-if-empty.patch
Normal file
37
nix/overrides/bazel/trim-last-argument-to-gcc-if-empty.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 177b4720d6fbaa7fdd17e5e11b2c79ac8f246786 Mon Sep 17 00:00:00 2001
|
||||
From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 21:08:51 -0700
|
||||
Subject: [PATCH] Trim last argument to gcc if empty, on Darwin
|
||||
|
||||
On Darwin, the last argument to GCC is coming up as an empty string.
|
||||
This is breaking the build of proto_library targets. However, I was not
|
||||
able to reproduce with the example cpp project[0].
|
||||
|
||||
This commit removes the last argument if it's an empty string. This is
|
||||
not a problem on Linux.
|
||||
|
||||
[0]: https://github.com/bazelbuild/examples/tree/master/cpp-tutorial/stage3
|
||||
---
|
||||
tools/cpp/osx_cc_wrapper.sh.tpl | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/cpp/osx_cc_wrapper.sh.tpl b/tools/cpp/osx_cc_wrapper.sh.tpl
|
||||
index 4c85cd9b6b..6c611e3d25 100644
|
||||
--- a/tools/cpp/osx_cc_wrapper.sh.tpl
|
||||
+++ b/tools/cpp/osx_cc_wrapper.sh.tpl
|
||||
@@ -53,7 +53,11 @@ done
|
||||
%{env}
|
||||
|
||||
# Call the C++ compiler
|
||||
-%{cc} "$@"
|
||||
+if [[ ${*: -1} = "" ]]; then
|
||||
+ %{cc} "${@:0:$#}"
|
||||
+else
|
||||
+ %{cc} "$@"
|
||||
+fi
|
||||
|
||||
function get_library_path() {
|
||||
for libdir in ${LIB_DIRS}; do
|
||||
--
|
||||
2.19.2
|
||||
|
@ -74,7 +74,7 @@ buildBazelPackage rec {
|
||||
find . -type d -empty -delete
|
||||
'';
|
||||
|
||||
sha256 = "1nlcw7p1gcsxkm4zzv4znqdkd42258576m9aavi57b1xqhk68fjm";
|
||||
sha256 = "1al0wywcdrcgh647s9wrdlyd2iq90rhm5v2pfkbxi2zyq403k61w";
|
||||
};
|
||||
|
||||
buildAttrs = {
|
||||
|
@ -50,7 +50,12 @@ buildBazelPackage rec {
|
||||
sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker
|
||||
'';
|
||||
|
||||
sha256 = "1b2apdfcpx7v0rjcl9frx02cac1gic0acx7p526q5all6xic6r6k";
|
||||
sha256 =
|
||||
if stdenv.isDarwin then
|
||||
"0nz0z9d8y7kckgzshlsbjxrkqdaxrjdyinjs4ffkbvr3iikf958g"
|
||||
else
|
||||
"08yr8419yl065sf129xy1dzadsxgq0vwsl59x7wq6f0ax08si1di"
|
||||
;
|
||||
};
|
||||
|
||||
buildAttrs = {
|
||||
|
Loading…
Reference in New Issue
Block a user