blob: 24da1665ac6605742734eebf2dc25edded77a0f5 [file] [log] [blame]
Carmelo Cascone72893b72018-08-09 00:59:06 -07001load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Ray Milkey472d8392018-05-23 17:06:51 -07002
Carmelo Cascone72893b72018-08-09 00:59:06 -07003P4RUNTIME_COMMIT = "028552d98b774301c51be0fe5bc97c9e95716759"
4PI_COMMIT = "36ca74fae69c8d0a142f8bfd2487bee72505cf48"
Ray Milkey472d8392018-05-23 17:06:51 -07005
6def generate_p4lang():
Carmelo Cascone72893b72018-08-09 00:59:06 -07007 http_archive(
8 name = "com_github_p4lang_p4runtime",
9 urls = ["https://github.com/p4lang/p4runtime/archive/%s.zip" % P4RUNTIME_COMMIT],
10 strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_COMMIT,
11 build_file = "//tools/build/bazel:p4runtime_BUILD"
Ray Milkey472d8392018-05-23 17:06:51 -070012 )
Carmelo Cascone72893b72018-08-09 00:59:06 -070013 # Needed for PI/proto/p4/tmp/p4config.proto
14 http_archive(
15 name = "com_github_p4lang_pi",
16 urls = ["https://github.com/p4lang/PI/archive/%s.zip" % PI_COMMIT],
17 strip_prefix = "PI-%s/proto" % PI_COMMIT,
18 build_file = "//tools/build/bazel:pi_BUILD"
Ray Milkey472d8392018-05-23 17:06:51 -070019 )