| workspace(name = "nexantic") |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") |
| |
| # Load skylib |
| |
| http_archive( |
| name = "bazel_skylib", |
| sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44", |
| urls = [ |
| "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| ], |
| ) |
| |
| load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") |
| |
| bazel_skylib_workspace() |
| |
| # Assert minimum Bazel version |
| |
| load("@bazel_skylib//lib:versions.bzl", "versions") |
| |
| versions.check(minimum_bazel_version = "2.2.0") |
| |
| # Go and Gazelle |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| http_archive( |
| # Currently pinned to an unreleased commit for compatibility with pinned Gazelle below. |
| # (we need //go/platforms:{aix,illumos,...} as generated by Gazelle) |
| name = "io_bazel_rules_go", |
| urls = [ |
| "https://github.com/bazelbuild/rules_go/archive/64f44314a710ce0e3ccc07891cec5f2047901ac8.tar.gz", |
| ], |
| strip_prefix = "rules_go-64f44314a710ce0e3ccc07891cec5f2047901ac8", |
| sha256 = "a8045644f4790d8dc7f25d25ee56ed9b7668f609f2aa1c59eef48d2dd9755430", |
| ) |
| |
| http_archive( |
| # Currently pinned to an unreleased commit that fixes build tag usage in `update-repos`. |
| # This can be unpinned once it makes it into 0.21.0. |
| name = "bazel_gazelle", |
| urls = [ |
| "https://github.com/bazelbuild/bazel-gazelle/archive/f6ed80dc6ff71e33233006db9584da4cd36a81e6.zip", |
| ], |
| strip_prefix = "bazel-gazelle-f6ed80dc6ff71e33233006db9584da4cd36a81e6", |
| sha256 = "509bb26e377a8ac28ebbd5fb999d15a428b092b0c533dc1e528d66d766ea273e", |
| ) |
| |
| load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") |
| |
| # golang.org/x/sys is overridden by the go_rules protobuf dependency -> declare it first, since |
| # we need a newer version of it for the netlink package which would fail to compile otherwise. |
| load("@bazel_gazelle//:deps.bzl", "go_repository") |
| |
| go_repository( |
| name = "org_golang_x_sys", |
| importpath = "golang.org/x/sys", |
| sum = "h1:q9u40nxWT5zRClI/uU9dHCiYGottAg6Nzz4YUQyHxdA=", |
| version = "v0.0.0-20190927073244-c990c680b611", |
| ) |
| |
| # we also pin github.com/golang/protobuf to 1.3.2, because we use gRPC 1.26 (can bump to 1.27 |
| # once https://github.com/etcd-io/etcd/issues/11563 is resolved and merged. |
| |
| go_repository( |
| name = "com_github_golang_protobuf", |
| build_file_proto_mode = "disable_global", |
| commit = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7", |
| importpath = "github.com/golang/protobuf", |
| patches = [ |
| "@io_bazel_rules_go//third_party:com_github_golang_protobuf-extras.patch", |
| ], |
| patch_args = ["-p1"], |
| ) |
| |
| go_rules_dependencies() |
| |
| go_register_toolchains( |
| go_version = "1.13", |
| nogo = "@//:nogo_vet", |
| ) |
| |
| load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") |
| |
| gazelle_dependencies() |
| |
| # Load Gazelle-generated local dependencies |
| |
| # gazelle:repository_macro third_party/go/repositories.bzl%go_repositories |
| load("//third_party/go:repositories.bzl", "go_repositories") |
| |
| go_repositories() |
| |
| # Protobuf |
| |
| http_archive( |
| name = "com_google_protobuf", |
| sha256 = "758249b537abba2f21ebc2d02555bf080917f0f2f88f4cbe2903e0e28c4187ed", |
| strip_prefix = "protobuf-3.10.0", |
| urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.10.0.tar.gz"], |
| ) |
| |
| load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") |
| |
| protobuf_deps() |
| |
| # Build packages |
| http_archive( |
| name = "rules_pkg", |
| sha256 = "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c", |
| url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz", |
| ) |
| |
| # third_party external repositories |
| load("//third_party/linux:external.bzl", "linux_external") |
| |
| linux_external( |
| name = "linux", |
| version = "5.6", |
| ) |
| |
| load("//third_party/edk2:external.bzl", "edk2_external") |
| |
| edk2_external(name = "edk2") |
| |
| load("//third_party/musl:external.bzl", "musl_external") |
| |
| musl_external( |
| name = "musl", |
| version = "1.1.24", |
| ) |
| |
| load("//third_party/util-linux:external.bzl", "util_linux_external") |
| |
| util_linux_external( |
| name = "util_linux", |
| version = "2.34", |
| ) |
| |
| load("//third_party/xfsprogs:external.bzl", "xfsprogs_external") |
| |
| xfsprogs_external( |
| name = "xfsprogs", |
| version = "5.2.1", |
| ) |
| |
| register_toolchains("//:host_python") |
| |
| # python dependencies. Currently we don't use Python, but some of our deps (ie. gvisor) do expect @pydeps// to exist, even |
| # if it's not being used. |
| |
| load("@rules_python//python:pip.bzl", "pip_import") |
| |
| pip_import( |
| name = "pydeps", |
| requirements = "//third_party/py:requirements.txt", |
| ) |
| |
| load("@pydeps//:requirements.bzl", "pip_install") |
| |
| pip_install() |
| |
| # same for gvisor/rules_docker. |
| |
| http_archive( |
| name = "io_bazel_rules_docker", |
| sha256 = "14ac30773fdb393ddec90e158c9ec7ebb3f8a4fd533ec2abbfd8789ad81a284b", |
| strip_prefix = "rules_docker-0.12.1", |
| urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.12.1/rules_docker-v0.12.1.tar.gz"], |
| ) |