Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 2 | |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 3 | P4RUNTIME_COMMIT = "028552d98b774301c51be0fe5bc97c9e95716759" |
| 4 | PI_COMMIT = "36ca74fae69c8d0a142f8bfd2487bee72505cf48" |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 5 | |
| 6 | def generate_p4lang(): |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 7 | 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 Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 12 | ) |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 13 | # 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 Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 19 | ) |