1workspace(name = "skia") 2 3load("//bazel:deps.bzl", "bazel_deps", "c_plus_plus_deps") 4 5bazel_deps() 6 7load("//toolchain:download_toolchains.bzl", "download_toolchains_for_skia") 8 9download_toolchains_for_skia("clang_linux_amd64", "clang_mac", "clang_windows_amd64", "ndk_linux_amd64", "clang_ios") 10 11load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") 12load("//bazel:gcs_mirror.bzl", "gcs_mirror_url") 13 14# See https://github.com/emscripten-core/emsdk/tree/85d27a4a2a60d591613a305b14ae438c2bb3ce11/bazel#setup-instructions 15http_archive( 16 name = "emsdk", 17 sha256 = "cb8cded78f6953283429d724556e89211e51ac4d871fcf38e0b32405ee248e91", 18 strip_prefix = "emsdk-3.1.44/bazel", 19 urls = gcs_mirror_url( 20 sha256 = "cb8cded78f6953283429d724556e89211e51ac4d871fcf38e0b32405ee248e91", 21 url = "https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.44.tar.gz", 22 ), 23) 24 25load("@emsdk//:deps.bzl", emsdk_deps = "deps") 26 27# One of the deps here is build_bazel_rules_nodejs, currently version 5.8.0 28# If we try to install it ourselves after this, it won't work. 29emsdk_deps() 30 31load("@emsdk//:emscripten_deps.bzl", emsdk_emscripten_deps = "emscripten_deps") 32 33emsdk_emscripten_deps(emscripten_version = "3.1.44") 34 35load("@bazel_toolchains//repositories:repositories.bzl", bazel_toolchains_repositories = "repositories") 36 37bazel_toolchains_repositories() 38 39http_archive( 40 name = "rules_pkg", 41 sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", 42 urls = gcs_mirror_url( 43 sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", 44 url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", 45 ), 46) 47 48load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") 49 50rules_pkg_dependencies() 51 52####################################################################################### 53# Python 54####################################################################################### 55 56# https://github.com/bazelbuild/rules_python 57http_archive( 58 name = "rules_python", 59 sha256 = "5fa3c738d33acca3b97622a13a741129f67ef43f5fdfcec63b29374cc0574c29", 60 strip_prefix = "rules_python-0.9.0", 61 urls = gcs_mirror_url( 62 sha256 = "5fa3c738d33acca3b97622a13a741129f67ef43f5fdfcec63b29374cc0574c29", 63 url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.9.0.tar.gz", 64 ), 65) 66 67# This sets up a hermetic python3, rather than depending on what is installed. 68load("@rules_python//python:repositories.bzl", "python_register_toolchains") 69 70python_register_toolchains( 71 name = "python3_9", 72 # https://github.com/bazelbuild/rules_python/blob/main/python/versions.bzl 73 python_version = "3.9", 74) 75 76load("@python3_9//:defs.bzl", "interpreter") 77load("@rules_python//python:pip.bzl", "pip_install") 78 79pip_install( 80 name = "py_deps", 81 python_interpreter_target = interpreter, 82 requirements = "//:requirements.txt", 83) 84 85####################################################################################### 86# Gazelle 87####################################################################################### 88 89http_archive( 90 name = "io_bazel_rules_go", 91 sha256 = "91585017debb61982f7054c9688857a2ad1fd823fc3f9cb05048b0025c47d023", 92 urls = [ 93 "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip", 94 "https://github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip", 95 ], 96) 97 98http_archive( 99 name = "bazel_gazelle", 100 sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809", 101 urls = [ 102 "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz", 103 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz", 104 ], 105) 106 107load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") 108load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies") 109load("//:go_repositories.bzl", "go_repositories") 110 111# gazelle:repository_macro go_repositories.bzl%go_repositories 112go_repositories() 113 114go_rules_dependencies() 115 116# For our Linux RBE pool 117go_download_sdk( 118 name = "go_sdk_linux_amd64", 119 goarch = "amd64", 120 goos = "linux", 121 version = "1.21.4", 122) 123 124# For the host machine 125go_download_sdk( 126 name = "go_sdk", 127 version = "1.21.4", 128) 129 130# Do not specify a version here or it will be an error (because we 131# specified the version above when downloading SDKs) 132go_register_toolchains() 133 134gazelle_dependencies( 135 go_repository_default_config = "//:WORKSPACE.bazel", 136 go_sdk = "go_sdk", 137) 138 139########################## 140# Other Go dependencies. # 141########################## 142 143load("//bazel:go_googleapis_compatibility_hack.bzl", "go_googleapis_compatibility_hack") 144 145# Compatibility hack to make the github.com/bazelbuild/remote-apis Go module work with rules_go 146# v0.41.0 or newer. See the go_googleapis() rule's docstring for details. 147go_googleapis_compatibility_hack( 148 name = "go_googleapis", 149) 150 151# Needed by @com_github_bazelbuild_remote_apis. 152http_archive( 153 name = "com_google_protobuf", 154 sha256 = "b8ab9bbdf0c6968cf20060794bc61e231fae82aaf69d6e3577c154181991f576", 155 strip_prefix = "protobuf-3.18.1", 156 urls = gcs_mirror_url( 157 sha256 = "b8ab9bbdf0c6968cf20060794bc61e231fae82aaf69d6e3577c154181991f576", 158 url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.18.1/protobuf-all-3.18.1.tar.gz", 159 ), 160) 161 162# Originally, we pulled protobuf dependencies as follows: 163# 164# load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") 165# protobuf_deps() 166# 167# The protobuf_deps() macro brings in a bunch of dependencies, but by copying the macro body here 168# and removing dependencies one by one, "rules_proto" was identified as the only dependency that is 169# required to build this repository. 170http_archive( 171 name = "rules_proto", 172 sha256 = "a4382f78723af788f0bc19fd4c8411f44ffe0a72723670a34692ffad56ada3ac", 173 strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf", 174 urls = ["https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip"], 175) 176 177http_archive( 178 name = "com_google_googleapis", 179 sha256 = "38701e513aff81c89f0f727e925bf04ac4883913d03a60cdebb2c2a5f10beb40", 180 strip_prefix = "googleapis-86fa44cc5ee2136e87c312f153113d4dd8e9c4de", 181 urls = [ 182 "https://github.com/googleapis/googleapis/archive/86fa44cc5ee2136e87c312f153113d4dd8e9c4de.tar.gz", 183 ], 184) 185 186# Needed by @com_github_bazelbuild_remote_apis for the googleapis protos. 187http_archive( 188 name = "googleapis", 189 build_file = "BUILD.googleapis", 190 sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d", 191 strip_prefix = "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d", 192 urls = gcs_mirror_url( 193 sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d", 194 # b/267219467 195 url = "https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip", 196 ), 197) 198 199load("@com_google_googleapis//:repository_rules.bzl", googleapis_imports_switched_rules_by_language = "switched_rules_by_language") 200 201googleapis_imports_switched_rules_by_language( 202 name = "com_google_googleapis_imports", 203 go = True, 204 grpc = True, 205) 206 207# Needed by @com_github_bazelbuild_remote_apis for gRPC. 208http_archive( 209 name = "com_github_grpc_grpc", 210 sha256 = "b391a327429279f6f29b9ae7e5317cd80d5e9d49cc100e6d682221af73d984a6", 211 strip_prefix = "grpc-93e8830070e9afcbaa992c75817009ee3f4b63a0", # v1.24.3 with fixes 212 urls = gcs_mirror_url( 213 sha256 = "b391a327429279f6f29b9ae7e5317cd80d5e9d49cc100e6d682221af73d984a6", 214 # Fix after https://github.com/grpc/grpc/issues/32259 is resolved 215 url = "https://github.com/grpc/grpc/archive/93e8830070e9afcbaa992c75817009ee3f4b63a0.zip", 216 ), 217) 218 219# Originally, we pulled gRPC dependencies as follows: 220# 221# load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") 222# grpc_deps() 223# 224# The grpc_deps() macro brings in a bunch of dependencies, but by copying the macro body here 225# and removing dependencies one by one, "zlib" was identified as the only dependency that is 226# required to build this repository. 227http_archive( 228 name = "zlib", 229 build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", 230 sha256 = "6d4d6640ca3121620995ee255945161821218752b551a1a180f4215f7d124d45", 231 strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", 232 url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", 233) 234 235################################################### 236# JavaScript / TypeScript rules and dependencies. # 237################################################### 238 239# The npm_install rule runs anytime the package.json or package-lock.json file changes. It also 240# extracts any Bazel rules distributed in an npm package. 241load("@build_bazel_rules_nodejs//:index.bzl", "npm_install") 242 243# Manages the node_modules directory. 244npm_install( 245 name = "npm", 246 package_json = "//:package.json", 247 package_lock_json = "//:package-lock.json", 248) 249 250# io_bazel_rules_webtesting allows us to download browsers in a hermetic, repeatable way. This 251# currently includes Chromium and Firefox. Note that the version on this does not necessarily 252# match the version below of the browsers-X.Y.Z below that is available. 253http_archive( 254 name = "io_bazel_rules_webtesting", 255 sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a", 256 urls = gcs_mirror_url( 257 sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a", 258 url = "https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz", 259 ), 260) 261 262# https://github.com/bazelbuild/rules_webtesting/blob/e9cf17123068b1123c68219edf9b274bf057b9cc/web/versioned/browsers-0.3.3.bzl 263load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories") 264 265browser_repositories( 266 chromium = True, 267 firefox = True, 268) 269 270################################################### 271# Rust rules and dependencies. # 272################################################### 273 274http_archive( 275 name = "rules_rust", 276 sha256 = "671ddb3fe5ebcf9dd34d051eca7352fbaf33fa53bf61eed0b75a4c34829e5480", 277 urls = gcs_mirror_url( 278 sha256 = "671ddb3fe5ebcf9dd34d051eca7352fbaf33fa53bf61eed0b75a4c34829e5480", 279 url = "https://github.com/bazelbuild/rules_rust/releases/download/0.52.2/rules_rust-v0.52.2.tar.gz", 280 ), 281) 282 283load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains") 284 285# https://github.com/bazelbuild/rules_rust/blob/5c715ec50602e2ba6ca2ebfdd870662a6e6d1eda/rust/repositories.bzl#L48 286rules_rust_dependencies() 287 288rust_register_toolchains( 289 edition = "2021", 290 extra_target_triples = [ 291 "aarch64-apple-darwin", 292 "aarch64-apple-ios", 293 ], 294 versions = [ 295 # supported versions from https://github.com/bazelbuild/rules_rust/blob/5c715ec50602e2ba6ca2ebfdd870662a6e6d1eda/util/fetch_shas_VERSIONS.txt 296 # The rust rules validate a toolchain by sha256 hash, as listed in https://github.com/bazelbuild/rules_rust/blob/5c715ec50602e2ba6ca2ebfdd870662a6e6d1eda/rust/known_shas.bzl 297 "1.76.0", 298 ], 299) 300 301# https://bazelbuild.github.io/rules_rust/crate_universe.html 302load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") 303 304crate_universe_dependencies() 305 306# cxxbridge-cmd is a binary only Rust crate, so we follow these instructions for it 307# http://bazelbuild.github.io/rules_rust/crate_universe.html#binary-dependencies 308# If we need to update this, replace the Cargo.lock files with empty (existing) files and then 309# CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index 310http_archive( 311 name = "cxxbridge_cmd", 312 build_file = "//bazel/external/cxxbridge_cmd:BUILD.bazel.skia", 313 sha256 = "19c3062da294104183e1c34ea9887941d4d8c74f6195ce9fbb430ac4b5290ede", 314 strip_prefix = "cxxbridge-cmd-1.0.143", 315 type = "tar.gz", 316 urls = gcs_mirror_url( 317 ext = ".tar.gz", 318 sha256 = "19c3062da294104183e1c34ea9887941d4d8c74f6195ce9fbb430ac4b5290ede", 319 url = "https://crates.io/api/v1/crates/cxxbridge-cmd/1.0.143/download", 320 ), 321) 322 323load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository") 324 325# This finds all the dependencies needed to build cxxbridge_cmd... 326crates_repository( 327 name = "cxxbridge_cmd_deps", 328 cargo_lockfile = "//bazel/external/cxxbridge_cmd:Cargo.lock", 329 manifests = ["@cxxbridge_cmd//:Cargo.toml"], 330) 331 332load("@cxxbridge_cmd_deps//:defs.bzl", cxxbridge_cmd_deps = "crate_repositories") 333 334# ... and adds them to the workspace. 335cxxbridge_cmd_deps() 336 337# The cxx crate needs a custom BUILD.bazel file because the one that would be autogenerated 338# by http://bazelbuild.github.io/rules_rust/crate_universe.html#direct-packages does not work. 339# Thus, we download it ourselves, as if it were a binary-only package. 340http_archive( 341 name = "cxx", 342 build_file = "//bazel/external/cxx:BUILD.bazel.skia", 343 sha256 = "050906babad73f9b32a91cecc3063ff1e2235226dd2367dd839fd6fbc941c68a", 344 strip_prefix = "cxx-1.0.143", 345 type = "tar.gz", 346 urls = gcs_mirror_url( 347 ext = ".tar.gz", 348 sha256 = "050906babad73f9b32a91cecc3063ff1e2235226dd2367dd839fd6fbc941c68a", 349 url = "https://crates.io/api/v1/crates/cxx/1.0.143/download", 350 ), 351) 352 353# This finds all the dependencies needed to build cxx... 354crates_repository( 355 name = "cxx_deps", 356 cargo_lockfile = "//bazel/external/cxx:Cargo.lock", 357 manifests = ["@cxx//:Cargo.toml"], 358) 359 360load("@cxx_deps//:defs.bzl", cxx_deps = "crate_repositories") 361 362# ... and adds them to the workspace. 363cxx_deps() 364 365# The fontations repository consists of multiple crates. We download those 366# listed in the external/fontations/Cargo.* files. 367# Add this entry to have a root repository from which the individual 368# fontations crates can be fetched. 369# This allows them to be used as deps in other bazel targets. 370crates_repository( 371 name = "fontations", 372 cargo_lockfile = "//bazel/external/fontations:Cargo.lock", 373 manifests = ["//bazel/external/fontations:Cargo.toml"], 374) 375 376load("@fontations//:defs.bzl", fontations_crates = "crate_repositories") 377 378fontations_crates() 379 380# The icu4x repository consists of multiple crates. We download those 381# listed in the external/icu4x/Cargo.* files. 382# Add this entry to have a root repository from which the individual 383# icu4x crates can be fetched. 384# This allows them to be used as deps in other bazel targets. 385crates_repository( 386 name = "icu4x_deps", 387 cargo_lockfile = "//bazel/external/icu4x:Cargo.lock", 388 manifests = ["//bazel/external/icu4x:Cargo.toml"], 389) 390 391load("@icu4x_deps//:defs.bzl", icu4x_deps = "crate_repositories") 392 393icu4x_deps() 394 395# The repository of third-party crates (currently just the `png` crate) 396# to support `//experimental/rust_png` code. 397crates_repository( 398 name = "rust_png", 399 cargo_lockfile = "//experimental/rust_png/ffi:Cargo.lock", 400 packages = { 401 "png": crate.spec( 402 version = "0.18.0-rc", 403 ), 404 }, 405) 406 407load("@rust_png//:defs.bzl", rust_png_crates = "crate_repositories") 408 409rust_png_crates() 410 411# Skia uses crates from the vello repository that are under development and have not been published 412# to crates.io. Normally we could fetch them directly from the git mirror in the Cargo.lock file as 413# Bazel supports compiling them without any custom build rules. However, since Bazel's repository 414# rules don't play well with the vello_shader crate's build script, we compile the vello 415# crates from source using the rules defined in bazel/external/vello/BUILD.bazel and the 416# new_git_repository rule. 417# 418# vello_deps contains the dependencies of the two crates we build out of the vello repo (namely 419# vello_shaders and vello_encoding). 420# 421# See comments in bazel/external/vello/BUILD.bazel for more information. 422crates_repository( 423 name = "vello_deps", 424 cargo_lockfile = "//bazel/external/vello:Cargo.lock", 425 manifests = ["//bazel/external/vello:Cargo.toml"], 426) 427 428load("@vello_deps//:defs.bzl", vello_deps = "crate_repositories") 429 430vello_deps() 431 432############################################################### 433 434# Bazel will look for env variables ANDROID_HOME and ANDROID_NDK_HOME. 435# This is NOT hermetic as it requires the user to handle downloading the SDK and accepting the 436# license independently. 437android_sdk_repository(name = "androidsdk") 438# TODO: skbug.com/14128 439# Uncomment the following after setting ANDROID_NDK_HOME to build for Android: 440# android_ndk_repository(name = "androidndk") 441 442# Clients must specify their own version of skia_user_config to overwrite SkUserConfig.h 443local_repository( 444 name = "skia_user_config", 445 path = "include/config", 446) 447 448# This are two lists of Bazel repository names, which is brought in by the following macro. 449# It is here for easier grepping, i.e. someone trying to find where a label like @brotli//:brotlidec 450# was defined. If a dep has its own BUILD rules, then one will need to go to its git repository 451# to find the BUILD or BUILD.bazel file with the rule. If a dep does not have Bazel support, then 452# that means someone on the Skia team wrote a BUILD.bazel file and put it in 453# //bazel/external/<dep_name> and one can go find it there. 454# 455#### START GENERATED LIST OF THIRD_PARTY DEPS 456# @abseil_cpp - https://skia.googlesource.com/external/github.com/abseil/abseil-cpp.git 457# @brotli - https://skia.googlesource.com/external/github.com/google/brotli.git 458# @highway - https://chromium.googlesource.com/external/github.com/google/highway.git 459# @spirv_headers - https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git 460# @spirv_tools - https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git 461# 462# @dawn - //bazel/external/dawn:BUILD.bazel 463# @delaunator - //bazel/external/delaunator:BUILD.bazel 464# @dng_sdk - //bazel/external/dng_sdk:BUILD.bazel 465# @expat - //bazel/external/expat:BUILD.bazel 466# @freetype - //bazel/external/freetype:BUILD.bazel 467# @harfbuzz - //bazel/external/harfbuzz:BUILD.bazel 468# @icu - //bazel/external/icu:BUILD.bazel 469# @icu4x - //bazel/external/icu4x:BUILD.bazel 470# @imgui - //bazel/external/imgui:BUILD.bazel 471# @libavif - //bazel/external/libavif:BUILD.bazel 472# @libgav1 - //bazel/external/libgav1:BUILD.bazel 473# @libjpeg_turbo - //bazel/external/libjpeg_turbo:BUILD.bazel 474# @libjxl - //bazel/external/libjxl:BUILD.bazel 475# @libpng - //bazel/external/libpng:BUILD.bazel 476# @libwebp - //bazel/external/libwebp:BUILD.bazel 477# @libyuv - //bazel/external/libyuv:BUILD.bazel 478# @perfetto - //bazel/external/perfetto:BUILD.bazel 479# @piex - //bazel/external/piex:BUILD.bazel 480# @spirv_cross - //bazel/external/spirv_cross:BUILD.bazel 481# @vello - //bazel/external/vello:BUILD.bazel 482# @vulkan_headers - //bazel/external/vulkan_headers:BUILD.bazel 483# @vulkan_tools - //bazel/external/vulkan_tools:BUILD.bazel 484# @vulkan_utility_libraries - //bazel/external/vulkan_utility_libraries:BUILD.bazel 485# @vulkanmemoryallocator - //bazel/external/vulkanmemoryallocator:BUILD.bazel 486# @wuffs - //bazel/external/wuffs:BUILD.bazel 487# @zlib_skia - //bazel/external/zlib_skia:BUILD.bazel 488#### END GENERATED LIST OF THIRD_PARTY DEPS 489c_plus_plus_deps() 490 491# In order to copy the Freetype configurations into the checked out Freetype folder, 492# it is easiest to treat them as a third-party dependency from the perspective of Freetype. 493# To do that, we put them in their own Bazel workspace and then have our injected BUILD.bazel 494# for Freetype reference this workspace. 495# https://bazel.build/reference/be/workspace#new_local_repository 496local_repository( 497 name = "freetype_config", 498 path = "third_party/freetype2/include", 499) 500 501local_repository( 502 name = "harfbuzz_config", 503 path = "third_party/harfbuzz", 504) 505 506local_repository( 507 name = "icu_utils", 508 path = "third_party/icu", 509) 510 511local_repository( 512 name = "expat_config", 513 path = "third_party/expat/include", 514) 515 516load("//bazel:cipd_install.bzl", "cipd_install") 517 518cipd_install( 519 name = "git_linux_amd64", 520 build_file_content = """ 521filegroup( 522 name = "all_files", 523 # The exclude pattern prevents files with spaces in their names from tripping up Bazel. 524 srcs = glob(include=["**/*"], exclude=["**/* *"]), 525 visibility = ["//visibility:public"], 526) 527""", 528 cipd_package = "infra/3pp/tools/git/linux-amd64", 529 # Based on 530 # https://skia.googlesource.com/buildbot/+/f1d21dc58818cd6aba0a7822e59d37636aefe936/WORKSPACE#391. 531 # 532 # Note that the below "git config" commands do not affect the user's Git configuration. These 533 # settings are only visible to Bazel targets that depend on @git_linux_amd64//:all_files via 534 # the "data" attribute. The result of these commands can be examined as follows: 535 # 536 # $ cat $(bazel info output_base)/external/git_linux_amd64/etc/gitconfig 537 # [user] 538 # name = Bazel Test User 539 # email = bazel-test-user@example.com 540 postinstall_cmds_posix = [ 541 "mkdir etc", 542 "bin/git config --system user.name \"Bazel Test User\"", 543 "bin/git config --system user.email \"bazel-test-user@example.com\"", 544 ], 545 # From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/git/linux-amd64/+/version:2.29.2.chromium.6 546 sha256 = "36cb96051827d6a3f6f59c5461996fe9490d997bcd2b351687d87dcd4a9b40fa", 547 tag = "version:2.29.2.chromium.6", 548) 549 550cipd_install( 551 name = "gn_linux_amd64", 552 build_file_content = """ 553exports_files( 554 ["gn"], 555 visibility = ["//visibility:public"] 556) 557""", 558 cipd_package = "gn/gn/linux-amd64", 559 # From https://chrome-infra-packages.appspot.com/p/gn/gn/linux-amd64/+/git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41 560 sha256 = "7195291488d08f3a10e85b85d8c4816e077015f1c5f196f770003a97aa42caf8", 561 tag = "git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41", 562) 563 564cipd_install( 565 name = "gn_mac_arm64", 566 build_file_content = """ 567exports_files( 568 ["gn"], 569 visibility = ["//visibility:public"] 570) 571""", 572 cipd_package = "gn/gn/mac-arm64", 573 # From https://chrome-infra-packages.appspot.com/p/gn/gn/mac-arm64/+/git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41 574 sha256 = "1123907ac3317530e9dd537d50cd83fd83e852aacc07d286f45753c8fc5287ed", 575 tag = "git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41", 576) 577 578cipd_install( 579 name = "gn_mac_amd64", 580 build_file_content = """ 581exports_files( 582 ["gn"], 583 visibility = ["//visibility:public"] 584) 585""", 586 cipd_package = "gn/gn/mac-amd64", 587 # From https://chrome-infra-packages.appspot.com/p/gn/gn/mac-amd64/+/git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41 588 sha256 = "ed96f7d2f49b83b016e4bdbed432e4734a5a133accb025d7c07685e01489ba93", 589 tag = "git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41", 590) 591 592cipd_install( 593 name = "skimage", 594 build_file = "//bazel/external/skimage:BUILD.bazel", 595 cipd_package = "skia/bots/skimage", 596 # From https://chrome-infra-packages.appspot.com/p/skia/bots/skimage/+/sRladEfUAXeYIBD3Pt3ke0Fd08vtYVLrg4IASKk5F6YC 597 sha256 = "b1195a7447d40177982010f73edde47b415dd3cbed6152eb83820048a93917a6", 598 tag = "version:47", 599) 600 601http_file( 602 name = "buildifier_linux_x64", 603 downloaded_file_path = "buildifier", 604 executable = True, 605 sha256 = "be63db12899f48600bad94051123b1fd7b5251e7661b9168582ce52396132e92", 606 urls = gcs_mirror_url( 607 ext = "", 608 sha256 = "be63db12899f48600bad94051123b1fd7b5251e7661b9168582ce52396132e92", 609 url = "https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildifier-linux-amd64", 610 ), 611) 612 613http_file( 614 name = "buildifier_macos_arm64", 615 downloaded_file_path = "buildifier", 616 executable = True, 617 sha256 = "fa07ba0d20165917ca4cc7609f9b19a8a4392898148b7babdf6bb2a7dd963f05", 618 urls = gcs_mirror_url( 619 ext = "", 620 sha256 = "fa07ba0d20165917ca4cc7609f9b19a8a4392898148b7babdf6bb2a7dd963f05", 621 url = "https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildifier-darwin-arm64", 622 ), 623) 624 625http_file( 626 name = "buildifier_macos_x64", 627 downloaded_file_path = "buildifier", 628 executable = True, 629 sha256 = "eeb47b2de27f60efe549348b183fac24eae80f1479e8b06cac0799c486df5bed", 630 urls = gcs_mirror_url( 631 ext = "", 632 sha256 = "eeb47b2de27f60efe549348b183fac24eae80f1479e8b06cac0799c486df5bed", 633 url = "https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildifier-darwin-amd64", 634 ), 635) 636 637################################## 638# Docker rules and dependencies. # 639################################## 640 641http_archive( 642 name = "io_bazel_rules_docker", 643 sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf", 644 urls = gcs_mirror_url( 645 sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf", 646 url = "https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz", 647 ), 648) 649 650load( 651 "@io_bazel_rules_docker//repositories:repositories.bzl", 652 container_repositories = "repositories", 653) 654 655container_repositories() 656 657# This is required by the toolchain_container rule. 658load( 659 "@io_bazel_rules_docker//repositories:go_repositories.bzl", 660 container_go_deps = "go_deps", 661) 662 663container_go_deps() 664 665load( 666 "@io_bazel_rules_docker//container:container.bzl", 667 "container_pull", 668) 669 670# Pulls the gcr.io/skia-public/debugger-app-base container. 671container_pull( 672 name = "debugger-app-base", 673 digest = "sha256:9e80d6bc5f111e4a3eb8bc61495c4e6321fb1021b3b0dd30b89b945fdea4ac47", 674 registry = "gcr.io", 675 repository = "skia-public/debugger-app-base", 676) 677 678# Pulls the gcr.io/skia-public/jsfiddle-base container. 679container_pull( 680 name = "jsfiddle-base", 681 digest = "sha256:05716f85828508dac29be332fcede4a37372ed416c1b74b375e64cd69823799f", 682 registry = "gcr.io", 683 repository = "skia-public/jsfiddle-base", 684) 685 686# Pulls the gcr.io/skia-public/shaders-base container. 687container_pull( 688 name = "shaders-base", 689 digest = "sha256:64b9cec3c82d5680c6ead567881f2f38e0eb217e354bb58a8e1582656a4aa841", 690 registry = "gcr.io", 691 repository = "skia-public/shaders-base", 692) 693 694# Pulls the gcr.io/skia-public/skottie-base container. 695container_pull( 696 name = "skottie-base", 697 digest = "sha256:86810319914389ae271631494f65c05a78d21252e0f54b7c3bd872cebd6a1c10", 698 registry = "gcr.io", 699 repository = "skia-public/skottie-base", 700) 701 702http_archive( 703 name = "build_bazel_rules_apple", 704 sha256 = "62847b3f444ce514ae386704a119ad7b29fa6dfb65a38bff4ae239f2389a0429", 705 url = "https://github.com/bazelbuild/rules_apple/releases/download/3.8.0/rules_apple.3.8.0.tar.gz", 706) 707 708load( 709 "@build_bazel_rules_apple//apple:repositories.bzl", 710 "apple_rules_dependencies", 711) 712 713apple_rules_dependencies() 714 715load( 716 "@build_bazel_rules_swift//swift:repositories.bzl", 717 "swift_rules_dependencies", 718) 719 720swift_rules_dependencies() 721 722load( 723 "@build_bazel_rules_swift//swift:extras.bzl", 724 "swift_rules_extra_dependencies", 725) 726 727swift_rules_extra_dependencies() 728 729load( 730 "@build_bazel_apple_support//lib:repositories.bzl", 731 "apple_support_dependencies", 732) 733 734apple_support_dependencies() 735