2023-08-16 08:45:44 -04:00
|
|
|
workspace(name = "constellation")
|
|
|
|
|
2023-09-06 07:42:55 -04:00
|
|
|
# nixpkgs deps
|
|
|
|
load("//bazel/toolchains:nixpkgs_deps.bzl", "nixpkgs_deps")
|
|
|
|
|
|
|
|
nixpkgs_deps()
|
|
|
|
|
|
|
|
load("@io_tweag_rules_nixpkgs//nixpkgs:repositories.bzl", "rules_nixpkgs_dependencies")
|
|
|
|
|
|
|
|
rules_nixpkgs_dependencies()
|
|
|
|
|
|
|
|
load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_flake_package")
|
|
|
|
|
|
|
|
nixpkgs_flake_package(
|
|
|
|
name = "mkosi",
|
|
|
|
nix_flake_file = "//:flake.nix",
|
|
|
|
nix_flake_lock_file = "//:flake.lock",
|
|
|
|
package = "mkosi",
|
|
|
|
)
|
|
|
|
|
2023-09-06 09:31:41 -04:00
|
|
|
load("//bazel/mkosi:mkosi_configure.bzl", "find_system_mkosi")
|
|
|
|
|
|
|
|
find_system_mkosi(name="constellation_mkosi")
|
|
|
|
|
2023-05-22 03:10:41 -04:00
|
|
|
# Python toolchain
|
|
|
|
load("//bazel/toolchains:python_deps.bzl", "python_deps")
|
|
|
|
|
|
|
|
python_deps()
|
|
|
|
|
|
|
|
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
|
|
|
|
|
|
|
|
py_repositories()
|
|
|
|
|
|
|
|
python_register_toolchains(
|
|
|
|
name = "python3_11",
|
|
|
|
python_version = "3.11",
|
|
|
|
)
|
|
|
|
|
2023-01-30 11:15:59 -05:00
|
|
|
# Go toolchain
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:go_rules_deps.bzl", "go_deps")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
go_deps()
|
|
|
|
|
|
|
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:go_module_deps.bzl", "go_dependencies")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
2023-03-13 13:33:31 -04:00
|
|
|
# gazelle:repository_macro bazel/toolchains/go_module_deps.bzl%go_dependencies
|
2023-01-30 11:15:59 -05:00
|
|
|
go_dependencies()
|
|
|
|
|
|
|
|
go_rules_dependencies()
|
|
|
|
|
2023-09-08 04:19:07 -04:00
|
|
|
go_register_toolchains(version = "1.20.8")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
gazelle_dependencies(go_repository_default_config = "//:WORKSPACE.bazel")
|
|
|
|
|
|
|
|
# gazelle:repo bazel_gazelle
|
|
|
|
|
2023-03-09 09:23:42 -05:00
|
|
|
# proto toolchain
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:proto_deps.bzl", "proto_deps")
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
proto_deps()
|
|
|
|
|
|
|
|
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
|
|
|
|
|
|
|
|
rules_proto_dependencies()
|
|
|
|
|
|
|
|
rules_proto_toolchains()
|
|
|
|
|
2023-01-30 11:15:59 -05:00
|
|
|
# dnf / rpm toolchain
|
|
|
|
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:dnf_deps.bzl", "dnf_deps")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
dnf_deps()
|
|
|
|
|
|
|
|
load("@bazeldnf//:deps.bzl", "bazeldnf_dependencies")
|
|
|
|
|
|
|
|
bazeldnf_dependencies()
|
|
|
|
|
|
|
|
load("//rpm:rpms.bzl", "rpms")
|
|
|
|
|
|
|
|
rpms()
|
|
|
|
|
|
|
|
# Buildifier
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:buildifier_deps.bzl", "buildifier_deps")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
buildifier_deps()
|
|
|
|
|
|
|
|
# C / C++ toolchains
|
|
|
|
|
2023-04-27 04:27:43 -04:00
|
|
|
load("//bazel/toolchains:hermetic_cc_deps.bzl", "hermetic_cc_deps")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
2023-04-27 04:27:43 -04:00
|
|
|
hermetic_cc_deps()
|
2023-01-30 11:15:59 -05:00
|
|
|
|
2023-04-27 04:27:43 -04:00
|
|
|
load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
2023-03-21 09:29:30 -04:00
|
|
|
# If needed, we can specify a specific version of the Zig toolchain to use.
|
2023-04-27 04:27:43 -04:00
|
|
|
# If not specified, hermetic_cc_toolchain will use a known good version of Zig.
|
2023-03-09 09:23:42 -05:00
|
|
|
# See https://ziglang.org/download/ for the latest releases
|
|
|
|
|
2023-03-21 09:29:30 -04:00
|
|
|
# zig_toolchains(
|
|
|
|
# host_platform_sha256 = {
|
|
|
|
# "linux-aarch64": "b759a11993949531c692ccfc3d1a004b14df714a7a3515fe0b5c90c9a7631d61",
|
|
|
|
# "linux-x86_64": "028dad5189e02b2058679b64df16e854a1c1ca0e6044b334d4f3be6e35544f07",
|
|
|
|
# "macos-aarch64": "5709c27d581988f50f5e6fd5b69d92707787e803a1d04992e290b764617664e6",
|
|
|
|
# "macos-x86_64": "88d194adb2f3c1a9edbb4a24d018007d5f827a57d1d26b2d9f3459236da1b7b6",
|
|
|
|
# "windows-x86_64": "75e510bda108e4d78b89d5d1d09e70ea8595fac7c43b5611f280668881adb09d",
|
|
|
|
# },
|
|
|
|
# version = "0.11.0-dev.1638+7199d7c77",
|
|
|
|
# )
|
|
|
|
|
|
|
|
zig_toolchains()
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
register_toolchains(
|
2023-06-09 11:39:30 -04:00
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.23",
|
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.23",
|
2023-01-30 11:15:59 -05:00
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_amd64_musl",
|
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_arm64_musl",
|
2023-06-09 11:39:30 -04:00
|
|
|
"@zig_sdk//toolchain:linux_amd64_gnu.2.23",
|
|
|
|
"@zig_sdk//toolchain:linux_arm64_gnu.2.23",
|
2023-02-01 06:48:19 -05:00
|
|
|
"@zig_sdk//toolchain:linux_amd64_musl",
|
|
|
|
"@zig_sdk//toolchain:linux_arm64_musl",
|
2023-01-30 11:15:59 -05:00
|
|
|
"@zig_sdk//toolchain:darwin_amd64",
|
|
|
|
"@zig_sdk//toolchain:darwin_arm64",
|
|
|
|
"@zig_sdk//toolchain:windows_amd64",
|
|
|
|
)
|
|
|
|
|
2023-03-09 09:23:42 -05:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "rules_foreign_cc",
|
|
|
|
sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51",
|
|
|
|
strip_prefix = "rules_foreign_cc-0.9.0",
|
2023-03-30 03:41:56 -04:00
|
|
|
type = "tar.gz",
|
|
|
|
urls = [
|
|
|
|
"https://cdn.confidential.cloud/constellation/cas/sha256/2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51",
|
|
|
|
"https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz",
|
|
|
|
],
|
2023-03-09 09:23:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
|
|
|
|
|
|
|
|
# This sets up some common toolchains for building targets. For more details, please see
|
|
|
|
# https://bazelbuild.github.io/rules_foreign_cc/0.9.0/flatten.html#rules_foreign_cc_dependencies
|
|
|
|
rules_foreign_cc_dependencies()
|
|
|
|
|
|
|
|
load("//3rdparty/bazel/org_openssl:openssl_repositories.bzl", "openssl_repositories")
|
|
|
|
|
|
|
|
openssl_repositories()
|
|
|
|
|
|
|
|
load("//3rdparty/bazel/org_openssl:openssl_setup.bzl", "openssl_setup")
|
|
|
|
|
|
|
|
openssl_setup()
|
|
|
|
|
2023-01-30 11:15:59 -05:00
|
|
|
# Packaging rules (tar)
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:pkg_deps.bzl", "pkg_deps")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
pkg_deps()
|
|
|
|
|
|
|
|
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
|
|
|
|
|
|
|
|
rules_pkg_dependencies()
|
|
|
|
|
|
|
|
# OCI rules
|
2023-03-13 06:45:50 -04:00
|
|
|
load("//bazel/toolchains:oci_deps.bzl", "oci_deps")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
oci_deps()
|
|
|
|
|
2023-03-15 08:10:05 -04:00
|
|
|
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
rules_oci_dependencies()
|
|
|
|
|
2023-04-03 11:48:30 -04:00
|
|
|
load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains")
|
2023-01-30 11:15:59 -05:00
|
|
|
|
|
|
|
oci_register_toolchains(
|
|
|
|
name = "oci",
|
|
|
|
crane_version = LATEST_CRANE_VERSION,
|
|
|
|
)
|
2023-03-13 13:33:31 -04:00
|
|
|
|
2023-07-06 02:46:06 -04:00
|
|
|
load("@aspect_bazel_lib//lib:repositories.bzl", "register_yq_toolchains")
|
2023-04-03 11:48:30 -04:00
|
|
|
load("//bazel/toolchains:container_images.bzl", "containter_image_deps")
|
|
|
|
|
|
|
|
containter_image_deps()
|
|
|
|
|
2023-07-06 02:46:06 -04:00
|
|
|
register_yq_toolchains()
|
|
|
|
|
2023-03-13 13:33:31 -04:00
|
|
|
# Multirun
|
|
|
|
load("//bazel/toolchains:multirun_deps.bzl", "multirun_deps")
|
|
|
|
|
|
|
|
multirun_deps()
|
2023-03-16 09:24:53 -04:00
|
|
|
|
2023-03-29 06:30:06 -04:00
|
|
|
load("//3rdparty/bazel/com_github_medik8s_node_maintainance_operator:source.bzl", "node_maintainance_operator_deps")
|
|
|
|
|
|
|
|
node_maintainance_operator_deps()
|
|
|
|
|
2023-03-16 09:24:53 -04:00
|
|
|
# CI deps
|
|
|
|
load("//bazel/toolchains:ci_deps.bzl", "ci_deps")
|
|
|
|
|
|
|
|
ci_deps()
|
2023-08-16 16:00:07 -04:00
|
|
|
|
|
|
|
# k8s deps
|
|
|
|
load("//bazel/toolchains:k8s.bzl", "k8s_deps")
|
|
|
|
|
|
|
|
k8s_deps()
|