mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
The test was not actually invoking the bazel that was downloaded with the `http_file` rule. I failed to add `executable = True` to the `http_file` call. This caused the test to ignore that bazel binary and went to the next one on the system. This patch fixes the issue by adding the missing attribute. Also, this patch changes the check in the test to make sure that the downloaded file is indeed executable.
157 lines
4.9 KiB
Python
157 lines
4.9 KiB
Python
workspace(name = "com_github_google_flatbuffers")
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
|
|
|
|
http_archive(
|
|
name = "platforms",
|
|
sha256 = "379113459b0feaf6bfbb584a91874c065078aa673222846ac765f86661c27407",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
|
|
"https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
|
|
],
|
|
)
|
|
|
|
http_archive(
|
|
name = "build_bazel_rules_swift",
|
|
sha256 = "a2fd565e527f83fb3f9eb07eb9737240e668c9242d3bc318712efa54a7deda97",
|
|
url = "https://github.com/bazelbuild/rules_swift/releases/download/0.27.0/rules_swift.0.27.0.tar.gz",
|
|
)
|
|
|
|
load(
|
|
"@build_bazel_rules_swift//swift:repositories.bzl",
|
|
"swift_rules_dependencies",
|
|
)
|
|
|
|
swift_rules_dependencies()
|
|
|
|
load(
|
|
"@build_bazel_rules_swift//swift:extras.bzl",
|
|
"swift_rules_extra_dependencies",
|
|
)
|
|
|
|
swift_rules_extra_dependencies()
|
|
|
|
http_archive(
|
|
name = "io_bazel_rules_go",
|
|
sha256 = "ae013bf35bd23234d1dea46b079f1e05ba74ac0321423830119d3e787ec73483",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
|
|
"https://github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
|
|
],
|
|
)
|
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies")
|
|
|
|
go_rules_dependencies()
|
|
|
|
##### Protobuf
|
|
_PROTOBUF_VERSION = "3.15.2"
|
|
|
|
http_archive(
|
|
name = "com_google_protobuf",
|
|
strip_prefix = "protobuf-" + _PROTOBUF_VERSION,
|
|
urls = [
|
|
"https://github.com/protocolbuffers/protobuf/archive/v" + _PROTOBUF_VERSION + ".tar.gz",
|
|
],
|
|
)
|
|
|
|
##### GRPC
|
|
_GRPC_VERSION = "1.49.0" # https://github.com/grpc/grpc/releases/tag/v1.48.0
|
|
|
|
http_archive(
|
|
name = "com_github_grpc_grpc",
|
|
patch_args = ["-p1"],
|
|
patches = ["//grpc:build_grpc_with_cxx14.patch"],
|
|
sha256 = "15715e1847cc9e42014f02c727dbcb48e39dbdb90f79ad3d66fe4361709ff935",
|
|
strip_prefix = "grpc-" + _GRPC_VERSION,
|
|
urls = ["https://github.com/grpc/grpc/archive/refs/tags/v" + _GRPC_VERSION + ".tar.gz"],
|
|
)
|
|
|
|
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
|
|
|
grpc_deps()
|
|
|
|
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
|
|
|
|
grpc_extra_deps()
|
|
|
|
# rules_go from https://github.com/bazelbuild/rules_go/releases/tag/v0.34.0
|
|
|
|
http_archive(
|
|
name = "aspect_rules_js",
|
|
sha256 = "124ed29fb0b3d0cba5b44f8f8e07897cf61b34e35e33b1f83d1a943dfd91b193",
|
|
strip_prefix = "rules_js-1.24.0",
|
|
url = "https://github.com/aspect-build/rules_js/releases/download/v1.24.0/rules_js-v1.24.0.tar.gz",
|
|
)
|
|
|
|
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
|
|
|
|
rules_js_dependencies()
|
|
|
|
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock", "pnpm_repository")
|
|
|
|
pnpm_repository(name = "pnpm")
|
|
|
|
http_archive(
|
|
name = "aspect_rules_ts",
|
|
sha256 = "8eb25d1fdafc0836f5778d33fb8eaac37c64176481d67872b54b0a05de5be5c0",
|
|
strip_prefix = "rules_ts-1.3.3",
|
|
url = "https://github.com/aspect-build/rules_ts/releases/download/v1.3.3/rules_ts-v1.3.3.tar.gz",
|
|
)
|
|
|
|
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
|
|
|
|
rules_ts_dependencies(
|
|
# Since rules_ts doesn't always have the newest integrity hashes, we
|
|
# compute it manually here.
|
|
# $ curl --silent https://registry.npmjs.org/typescript/5.0.4 | jq ._integrity
|
|
ts_integrity = "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
|
|
ts_version_from = "//:package.json",
|
|
)
|
|
|
|
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
|
|
|
|
nodejs_register_toolchains(
|
|
name = "nodejs",
|
|
node_version = DEFAULT_NODE_VERSION,
|
|
)
|
|
|
|
npm_translate_lock(
|
|
name = "npm",
|
|
npmrc = "//:.npmrc",
|
|
pnpm_lock = "//:pnpm-lock.yaml",
|
|
# Set this to True when the lock file needs to be updated, commit the
|
|
# changes, then set to False again.
|
|
update_pnpm_lock = False,
|
|
verify_node_modules_ignored = "//:.bazelignore",
|
|
)
|
|
|
|
load("@npm//:repositories.bzl", "npm_repositories")
|
|
|
|
npm_repositories()
|
|
|
|
http_archive(
|
|
name = "aspect_rules_esbuild",
|
|
sha256 = "2ea31bd97181a315e048be693ddc2815fddda0f3a12ca7b7cc6e91e80f31bac7",
|
|
strip_prefix = "rules_esbuild-0.14.4",
|
|
url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.14.4/rules_esbuild-v0.14.4.tar.gz",
|
|
)
|
|
|
|
# Register a toolchain containing esbuild npm package and native bindings
|
|
load("@aspect_rules_esbuild//esbuild:repositories.bzl", "LATEST_VERSION", "esbuild_register_toolchains")
|
|
|
|
esbuild_register_toolchains(
|
|
name = "esbuild",
|
|
esbuild_version = LATEST_VERSION,
|
|
)
|
|
|
|
http_file(
|
|
name = "bazel_linux_x86_64",
|
|
downloaded_file_path = "bazel",
|
|
executable = True,
|
|
sha256 = "e89747d63443e225b140d7d37ded952dacea73aaed896bca01ccd745827c6289",
|
|
urls = [
|
|
"https://github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-linux-x86_64",
|
|
],
|
|
)
|