blob: fba260e349c2e514089ef7e71ad350fab21a2cec [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 Casconea52c8802018-12-18 13:30:45 -08003P4RUNTIME_VER = "1.0.0"
4P4RUNTIME_SHA = "667464bd369b40b58dc9552be2c84e190a160b6e77137b735bd86e5b81c6adc0"
Ray Milkey472d8392018-05-23 17:06:51 -07005
Carmelo Casconea52c8802018-12-18 13:30:45 -08006PI_COMMIT = "539e4624f16aac39f8890a6dfb11c65040e735ad"
Carmelo Casconeb0f45fe2018-10-11 08:31:59 -07007PI_SHA = "a16024972c15e6d35466996bbb748e4b7bef819c1c93f05a0f2228062736c35a"
Carmelo Cascone6a1ae712018-08-10 12:19:47 -07008
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",
Carmelo Casconea52c8802018-12-18 13:30:45 -080012 urls = ["https://github.com/p4lang/p4runtime/archive/v%s.zip" % P4RUNTIME_VER],
Carmelo Cascone6a1ae712018-08-10 12:19:47 -070013 sha256 = P4RUNTIME_SHA,
Carmelo Casconea52c8802018-12-18 13:30:45 -080014 strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_VER,
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 )