Files
mongo/WORKSPACE.bazel
Jaya Kasa 9d57d4febb SERVER-101911: moving deps to bzlmod (#32753)
GitOrigin-RevId: 385e68b309da50a49a0417d3b2f53eeaae49a418
2025-04-10 01:33:10 +00:00

138 lines
3.8 KiB
Python

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//bazel/toolchains:mongo_toolchain.bzl", "setup_mongo_toolchains")
http_archive(
name = "aspect_rules_lint",
sha256 = "f60e4a737a5e09402f5fa3bd182efa80dac5523ca4b9bc5c6fa8c06fbfb46630",
strip_prefix = "rules_lint-1.1.0",
url = "https://github.com/aspect-build/rules_lint/releases/download/v1.1.0/rules_lint-v1.1.0.tar.gz",
)
setup_mongo_toolchains()
http_archive(
name = "windows_sasl",
build_file_content = """
package(default_visibility = ["//visibility:public"])
filegroup(
name = "includes",
srcs = select({
"@platforms//os:windows": glob(["include/**/*.h"]),
"//conditions:default": [],
}),
)
filegroup(
name = "libraries",
srcs = select({
"@platforms//os:windows": glob(["lib/**/*"]),
"//conditions:default": [],
}),
)
filegroup(
name = "bins",
srcs = select({
"@platforms//os:windows": glob(["bin/**/*"]),
"//conditions:default": [],
}),
)
""",
sha256 = "3e22e2b16f802277123590f64dfda44f1c9c8a2b7e758180cd956d8ab0965817",
url = "https://s3.amazonaws.com/boxes.10gen.com/build/windows_cyrus_sasl-2.1.28.zip",
)
load("//bazel/coverity:coverity_toolchain.bzl", "coverity_toolchain")
coverity_toolchain(
name = "rules_coverity",
)
load("@rules_coverity//coverity:repositories.bzl", "rules_coverity_toolchains")
rules_coverity_toolchains()
load("@rules_poetry//rules_poetry:poetry.bzl", "poetry")
poetry(
name = "poetry",
excludes = [
"mdit-py-plugins", # plugins for markdown-it-py. Introduces an optional circular dependency that bazel does not like.
],
lockfile = "//:poetry.lock",
pyproject = "//:pyproject.toml",
python_interpreter_target_default = "@py_host//:dist/bin/python3",
python_interpreter_target_mac = "@py_host//:dist/bin/python3",
python_interpreter_target_win = "@py_host//:dist/python.exe",
)
load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
# Sub in the system openssl for boringssl since we don't want two implementations of
# ssl in the same address space.
new_local_repository(
name = "boringssl",
build_file_content = """
cc_library(
name = "crypto",
linkopts = ["-lcrypto"],
visibility = ["//visibility:public"],
)
cc_library(
name = "ssl",
linkopts = ["-lssl"],
visibility = ["//visibility:public"],
)
""",
path = "bazel/_openssl_placeholder_for_grpc",
)
# Overloads for the vendored repositories.
#
# WARNING: Don't change the order of the deps() calls and local_repositories.
# They're read linearly dependencies that come first override later
# ones. Dependency updates might change the correct order, though it's
# unlikely. This is obviously a temporary solution and will no longer
# be necessary once migration to bzlmod is complete.
# Note: rules_python is implicitly loaded with a grpc-compatible version.
load("//bazel/install_rules:pigz.bzl", "setup_pigz")
setup_pigz(
name = "pigz",
)
load("//bazel/format:shfmt.bzl", "shfmt")
shfmt()
# This repository is normally created by db-contrib-tool or manually extracting the binaries at the proper location
new_local_repository(
name = "mongot_localdev",
build_file_content = """
package(default_visibility = ["//visibility:public"])
filegroup(
name = "mongot_binaries",
srcs = glob(["**"], exclude = ["BUILD", "WORKSPACE"]),
)
""",
path = "mongot-localdev",
)