Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 1 | # Copyright 2023 The Bazel Authors. All rights reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | """Macros for defining dependencies we need to build Bazel. |
| 15 | |
| 16 | """ |
| 17 | |
Xùdōng Yáng | e253020 | 2024-09-25 02:48:02 -0400 | [diff] [blame] | 18 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") |
Xùdōng Yáng | 7a5c1fa | 2024-04-02 17:42:24 -0400 | [diff] [blame] | 19 | load("//src/tools/bzlmod:utils.bzl", "get_canonical_repo_name") |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 20 | |
| 21 | ################################################################################## |
| 22 | # |
| 23 | # The list of repositories required while bootstrapping Bazel offline |
| 24 | # |
| 25 | ################################################################################## |
| 26 | DIST_ARCHIVE_REPOS = [get_canonical_repo_name(repo) for repo in [ |
Xùdōng Yáng | 298d3d6 | 2024-05-13 15:11:14 -0400 | [diff] [blame] | 27 | # keep sorted |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 28 | "abseil-cpp", |
| 29 | "apple_support", |
| 30 | "bazel_skylib", |
| 31 | "blake3", |
| 32 | "c-ares", |
| 33 | "com_github_grpc_grpc", |
| 34 | "com_google_protobuf", |
| 35 | "io_bazel_skydoc", |
| 36 | "platforms", |
| 37 | "rules_cc", |
| 38 | "rules_go", |
Xùdōng Yáng | 298d3d6 | 2024-05-13 15:11:14 -0400 | [diff] [blame] | 39 | "rules_graalvm", |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 40 | "rules_java", |
| 41 | "rules_jvm_external", |
Xùdōng Yáng | 7a5c1fa | 2024-04-02 17:42:24 -0400 | [diff] [blame] | 42 | "rules_kotlin", |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 43 | "rules_license", |
| 44 | "rules_pkg", |
| 45 | "rules_proto", |
| 46 | "rules_python", |
| 47 | "upb", |
| 48 | "zlib", |
| 49 | "zstd-jni", |
| 50 | ]] + [(get_canonical_repo_name("com_github_grpc_grpc") + suffix) for suffix in [ |
| 51 | # Extra grpc dependencies introduced via its module extension |
| 52 | "~grpc_repo_deps_ext~bazel_gazelle", # TODO: Should be a bazel_dep |
| 53 | "~grpc_repo_deps_ext~bazel_skylib", # TODO: Should be removed |
| 54 | "~grpc_repo_deps_ext~com_envoyproxy_protoc_gen_validate", |
| 55 | "~grpc_repo_deps_ext~com_github_cncf_udpa", |
| 56 | "~grpc_repo_deps_ext~com_google_googleapis", |
| 57 | "~grpc_repo_deps_ext~envoy_api", |
| 58 | "~grpc_repo_deps_ext~rules_cc", # TODO: Should be removed |
Xùdōng Yáng | 7a5c1fa | 2024-04-02 17:42:24 -0400 | [diff] [blame] | 59 | ]] + [ |
| 60 | # TODO(pcloudy): Remove after https://github.com/bazelbuild/rules_kotlin/issues/1106 is fixed |
| 61 | get_canonical_repo_name("rules_kotlin") + "~rules_kotlin_extensions~com_github_jetbrains_kotlin", |
Xùdōng Yáng | 84525a0 | 2024-05-22 14:46:00 -0400 | [diff] [blame] | 62 | ] + ["bazel_features~"] |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 63 | |
| 64 | ################################################################################## |
| 65 | # |
| 66 | # Make sure all URLs below are mirrored to https://mirror.bazel.build |
| 67 | # |
| 68 | ################################################################################## |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 69 | |
| 70 | def embedded_jdk_repositories(): |
| 71 | """OpenJDK distributions used to create a version of Bazel bundled with the OpenJDK.""" |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 72 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 73 | name = "openjdk_linux_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 74 | integrity = "sha256-MY0MLtPIdvt+oslSlFzc997PtSZMpRrs4VnmNaxT1UQ=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 75 | downloaded_file_path = "zulu-linux-vanilla.tar.gz", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 76 | url = "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_x64.tar.gz", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 77 | ) |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 78 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 79 | name = "openjdk_linux_aarch64_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 80 | integrity = "sha256-2jwtfbM2cLz2ZTJEGut/M9zw0ifI2v5841zuZ/aCnEw=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 81 | downloaded_file_path = "zulu-linux-aarch64-vanilla.tar.gz", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 82 | url = "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_aarch64.tar.gz", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 83 | ) |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 84 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 85 | name = "openjdk_linux_s390x_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 86 | integrity = "sha256-yQDI1k+rHlMnSXT6Skxzalo3VEhaXFb0lHKBSAdzZYo=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 87 | downloaded_file_path = "adoptopenjdk-s390x-vanilla.tar.gz", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 88 | url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.4%2B7/OpenJDK21U-jdk_s390x_linux_hotspot_21.0.4_7.tar.gz", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 89 | ) |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 90 | http_file( |
| 91 | name = "openjdk_linux_ppc64le_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 92 | integrity = "sha256-wgjND7kFYGRKkPkoZn0vU7/kCMlXpeNiBlha2HRCd2E=", |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 93 | downloaded_file_path = "adoptopenjdk-ppc64le-vanilla.tar.gz", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 94 | url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.4%2B7/OpenJDK21U-jdk_ppc64le_linux_hotspot_21.0.4_7.tar.gz", |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 95 | ) |
| 96 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 97 | name = "openjdk_macos_x86_64_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 98 | integrity = "sha256-XOdaaiR8cCm3TEynz29g/SstaM4eiVb7RI0phDFrX+o=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 99 | downloaded_file_path = "zulu-macos-vanilla.tar.gz", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 100 | url = "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_x64.tar.gz", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 101 | ) |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 102 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 103 | name = "openjdk_macos_aarch64_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 104 | integrity = "sha256-vCdQ+BoWbMbpwwroqrpU8lOoyOydjPwEpVX+IHEse/8=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 105 | downloaded_file_path = "zulu-macos-aarch64-vanilla.tar.gz", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 106 | url = "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_aarch64.tar.gz", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 107 | ) |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 108 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 109 | name = "openjdk_win_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 110 | integrity = "sha256-13Ha0Q0/C0QMNobR89K2izIIAqyXshLYdnGvPy7viEg=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 111 | downloaded_file_path = "zulu-win-vanilla.zip", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 112 | url = "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_x64.zip", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 113 | ) |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 114 | http_file( |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 115 | name = "openjdk_win_arm64_vanilla", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 116 | integrity = "sha256-n4c+zPAwsdPch57B6w/14Rv3YALcgcXGRMNGK/bFFGs=", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 117 | downloaded_file_path = "zulu-win-arm64.zip", |
Xùdōng Yáng | f586107 | 2024-10-10 14:47:55 -0400 | [diff] [blame] | 118 | url = "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_aarch64.zip", |
Yun Peng | 33a313c | 2023-11-08 11:44:57 +0100 | [diff] [blame] | 119 | ) |
| 120 | |
| 121 | def bazelci_rules_repo(): |
| 122 | """Required by the Bazel CI jobs.""" |
| 123 | http_archive( |
| 124 | name = "bazelci_rules", |
| 125 | sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e", |
| 126 | strip_prefix = "bazelci_rules-1.0.0", |
| 127 | url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz", |
| 128 | ) |
| 129 | |
| 130 | def android_deps_repos(): |
| 131 | """Required by building the android tools.""" |
| 132 | http_archive( |
| 133 | name = "desugar_jdk_libs", |
| 134 | sha256 = "ef71be474fbb3b3b7bd70cda139f01232c63b9e1bbd08c058b00a8d538d4db17", |
| 135 | strip_prefix = "desugar_jdk_libs-24dcd1dead0b64aae3d7c89ca9646b5dc4068009", |
| 136 | url = "https://github.com/google/desugar_jdk_libs/archive/24dcd1dead0b64aae3d7c89ca9646b5dc4068009.zip", |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 137 | ) |