blob: d4d966cc5014c87d08088b8ed8373bb9136179b4 [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
Carmelo Cascone6a1ae712018-08-10 12:19:47 -07006P4RUNTIME_SHA = "f335573ea971c21a1a298954039a27881b7337a03f4523321b6458eb0558644a"
7PI_SHA = "767476cf9232dc39f0115d1ffc38f9b81acec74da078c048f278804f325bf77e"
8
Ray Milkey472d8392018-05-23 17:06:51 -07009def generate_p4lang():
Carmelo Cascone72893b72018-08-09 00:59:06 -070010 http_archive(
11 name = "com_github_p4lang_p4runtime",
12 urls = ["https://github.com/p4lang/p4runtime/archive/%s.zip" % P4RUNTIME_COMMIT],
Carmelo Cascone6a1ae712018-08-10 12:19:47 -070013 sha256 = P4RUNTIME_SHA,
Carmelo Cascone72893b72018-08-09 00:59:06 -070014 strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_COMMIT,
Ray Milkey5063f5b2018-08-15 16:22:30 -070015 build_file = "//tools/build/bazel:p4runtime_BUILD",
Ray Milkey472d8392018-05-23 17:06:51 -070016 )
Ray Milkey5063f5b2018-08-15 16:22:30 -070017
Carmelo Cascone72893b72018-08-09 00:59:06 -070018 # Needed for PI/proto/p4/tmp/p4config.proto
19 http_archive(
20 name = "com_github_p4lang_pi",
21 urls = ["https://github.com/p4lang/PI/archive/%s.zip" % PI_COMMIT],
Carmelo Cascone6a1ae712018-08-10 12:19:47 -070022 sha256 = PI_SHA,
Carmelo Cascone72893b72018-08-09 00:59:06 -070023 strip_prefix = "PI-%s/proto" % PI_COMMIT,
Ray Milkey5063f5b2018-08-15 16:22:30 -070024 build_file = "//tools/build/bazel:pi_BUILD",
Ray Milkey472d8392018-05-23 17:06:51 -070025 )