blob: 62796fb2eb9c53ec6389d30d59eab92fef582f0f [file] [log] [blame]
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02001workspace(name = "nexantic")
Leopold Schabel5c80aca2019-10-22 15:48:58 +02002
3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
5
6# Load skylib
7
8http_archive(
9 name = "bazel_skylib",
10 sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
11 urls = [
12 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
13 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
14 ],
15)
16
17load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
18
19bazel_skylib_workspace()
20
21# Assert minimum Bazel version
22
23load("@bazel_skylib//lib:versions.bzl", "versions")
24
Leopold Schabelf1d34d32020-01-07 14:15:44 +010025versions.check(minimum_bazel_version = "2.0.0")
Leopold Schabel5c80aca2019-10-22 15:48:58 +020026
27# Go and Gazelle
28
29load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
30
31http_archive(
32 name = "io_bazel_rules_go",
Leopold Schabelf1d34d32020-01-07 14:15:44 +010033 sha256 = "e88471aea3a3a4f19ec1310a55ba94772d087e9ce46e41ae38ecebe17935de7b",
Leopold Schabel5c80aca2019-10-22 15:48:58 +020034 urls = [
Leopold Schabelf1d34d32020-01-07 14:15:44 +010035 "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.20.3/rules_go-v0.20.3.tar.gz",
36 "https://github.com/bazelbuild/rules_go/releases/download/v0.20.3/rules_go-v0.20.3.tar.gz",
Leopold Schabel5c80aca2019-10-22 15:48:58 +020037 ],
38)
39
40http_archive(
41 name = "bazel_gazelle",
Leopold Schabelf1d34d32020-01-07 14:15:44 +010042 sha256 = "86c6d481b3f7aedc1d60c1c211c6f76da282ae197c3b3160f54bd3a8f847896f",
Leopold Schabel5c80aca2019-10-22 15:48:58 +020043 urls = [
Leopold Schabelf1d34d32020-01-07 14:15:44 +010044 "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz",
45 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz",
Leopold Schabel5c80aca2019-10-22 15:48:58 +020046 ],
47)
48
49load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
50
51# golang.org/x/sys is overridden by the go_rules protobuf dependency -> declare it first, since
52# we need a newer version of it for the netlink package which would fail to compile otherwise.
53load("@bazel_gazelle//:deps.bzl", "go_repository")
54
55go_repository(
56 name = "org_golang_x_sys",
57 importpath = "golang.org/x/sys",
58 sum = "h1:ZtoklVMHQy6BFRHkbG6JzK+S6rX82//Yeok1vMlizfQ=",
59 version = "v0.0.0-20191018095205-727590c5006e",
60)
61
62go_rules_dependencies()
63
Leopold Schabel60a85b62019-11-17 19:12:41 +010064go_register_toolchains(
65 go_version = "1.13",
66 nogo = "@//:nogo_vet",
67)
Leopold Schabel5c80aca2019-10-22 15:48:58 +020068
69load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
70
71gazelle_dependencies()
72
73# Load Gazelle-generated local dependencies
74
75# gazelle:repository_macro repositories.bzl%go_repositories
76load("//:repositories.bzl", "go_repositories")
77
78go_repositories()
79
80# Protobuf
81
82http_archive(
83 name = "com_google_protobuf",
84 sha256 = "758249b537abba2f21ebc2d02555bf080917f0f2f88f4cbe2903e0e28c4187ed",
85 strip_prefix = "protobuf-3.10.0",
86 urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.10.0.tar.gz"],
87)
88
89load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
90
91protobuf_deps()
92
93# External repository filegroup shortcut
94all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
95
96# Linux kernel
97
Serge Bazanski731d00a2020-02-03 19:08:07 +010098linux_version = "5.4.7"
Leopold Schabel5c80aca2019-10-22 15:48:58 +020099
100http_archive(
Serge Bazanski731d00a2020-02-03 19:08:07 +0100101 name = "linux",
102 build_file = "//third_party/linux/external:BUILD.repo",
Lorenz Brun0bcaaee2019-11-06 12:42:39 +0100103 patch_args = ["-p1"],
104 patches = [
Lorenz Brun0bcaaee2019-11-06 12:42:39 +0100105 # Enable built-in cmdline for efistub
Serge Bazanski731d00a2020-02-03 19:08:07 +0100106 "//third_party/linux/external:0001-x86-Allow-built-in-command-line-to-work-in-early-ker.patch",
Lorenz Brun0bcaaee2019-11-06 12:42:39 +0100107 ],
Leopold Schabelf1d34d32020-01-07 14:15:44 +0100108 sha256 = "abc9b21d9146d95853dac35f4c4489a0199aff53ee6eee4b0563d1b37079fcc9",
Serge Bazanski731d00a2020-02-03 19:08:07 +0100109 strip_prefix = "linux-" + linux_version,
110 urls = ["https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-%s.tar.xz" % linux_version],
Leopold Schabel5c80aca2019-10-22 15:48:58 +0200111)
112
113# EDK2
114
115# edk2-stable201908
116new_git_repository(
117 name = "edk2",
Serge Bazanskidcb3a562020-02-03 13:44:44 +0100118 build_file = "//core/build/edk2:BUILD.repo",
Leopold Schabel5c80aca2019-10-22 15:48:58 +0200119 commit = "37eef91017ad042035090cae46557f9d6e2d5917",
120 init_submodules = True,
121 remote = "https://github.com/tianocore/edk2",
122 shallow_since = "1567048229 +0800",
123)
124
125# musl
126
Leopold Schabelf1d34d32020-01-07 14:15:44 +0100127musl_version = "1.1.24"
Leopold Schabel5c80aca2019-10-22 15:48:58 +0200128
129http_archive(
130 name = "musl",
131 build_file_content = all_content,
Leopold Schabelf1d34d32020-01-07 14:15:44 +0100132 sha256 = "1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3",
Leopold Schabel5c80aca2019-10-22 15:48:58 +0200133 strip_prefix = "musl-" + musl_version,
134 urls = ["https://www.musl-libc.org/releases/musl-%s.tar.gz" % musl_version],
135)
136
137# util-linux
138
139util_linux_version = "2.34"
140
141http_archive(
142 name = "util_linux",
143 build_file_content = all_content,
144 sha256 = "1d0c1a38f8c14a2c251681907203cccc78704f5702f2ef4b438bed08344242f7",
145 strip_prefix = "util-linux-" + util_linux_version,
146 urls = ["https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/snapshot/util-linux-%s.tar.gz" % util_linux_version],
147)
148
149# xfsprogs-dev
150
151xfsprogs_dev_version = "5.2.1"
152
153http_archive(
154 name = "xfsprogs_dev",
155 build_file_content = all_content,
156 patch_args = ["-p1"],
157 patches = [
Serge Bazanskidcb3a562020-02-03 13:44:44 +0100158 "//core/build/utils/xfsprogs_dev:0001-Fixes-for-static-compilation.patch",
Leopold Schabel5c80aca2019-10-22 15:48:58 +0200159 ],
160 sha256 = "6187f25f1744d1ecbb028b0ea210ad586d0f2dae24e258e4688c67740cc861ef",
161 strip_prefix = "xfsprogs-dev-" + xfsprogs_dev_version,
162 urls = ["https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/snapshot/xfsprogs-dev-%s.tar.gz" % xfsprogs_dev_version],
163)
Lorenz Brun6c39ea12019-11-04 11:39:42 +0100164
165# Kubernetes
Leopold Schabelf1d34d32020-01-07 14:15:44 +0100166k8s_version = "1.16.4"
Lorenz Brun6c39ea12019-11-04 11:39:42 +0100167
168http_archive(
169 name = "kubernetes",
170 patch_args = ["-p1"],
171 patches = [
Serge Bazanskidcb3a562020-02-03 13:44:44 +0100172 "//core/build/kubernetes:0001-avoid-unexpected-keyword-error-by-using-positional-p.patch",
Lorenz Brun6c39ea12019-11-04 11:39:42 +0100173 ],
Leopold Schabelf1d34d32020-01-07 14:15:44 +0100174 sha256 = "3a49373ba56c73c282deb0cfa2ec7bfcc6bf46acb6992f01319eb703cbf68996",
Lorenz Brun6c39ea12019-11-04 11:39:42 +0100175 urls = ["https://dl.k8s.io/v%s/kubernetes-src.tar.gz" % k8s_version],
176)
177
178load("@kubernetes//build:workspace_mirror.bzl", "mirror")
179
180http_archive(
181 name = "io_k8s_repo_infra",
182 sha256 = "f6d65480241ec0fd7a0d01f432938b97d7395aeb8eefbe859bb877c9b4eafa56",
183 strip_prefix = "repo-infra-9f4571ad7242bf3ec4b47365062498c2528f9a5f",
184 urls = mirror("https://github.com/kubernetes/repo-infra/archive/9f4571ad7242bf3ec4b47365062498c2528f9a5f.tar.gz"),
Lorenz Brun0bcaaee2019-11-06 12:42:39 +0100185)