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 | e45902b | 2018-12-18 13:30:45 -0800 | [diff] [blame] | 3 | P4RUNTIME_VER = "1.0.0" |
| 4 | P4RUNTIME_SHA = "667464bd369b40b58dc9552be2c84e190a160b6e77137b735bd86e5b81c6adc0" |
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", |
Carmelo Cascone | e45902b | 2018-12-18 13:30:45 -0800 | [diff] [blame] | 9 | urls = ["https://github.com/p4lang/p4runtime/archive/v%s.zip" % P4RUNTIME_VER], |
Carmelo Cascone | 6a1ae71 | 2018-08-10 12:19:47 -0700 | [diff] [blame] | 10 | sha256 = P4RUNTIME_SHA, |
Carmelo Cascone | e45902b | 2018-12-18 13:30:45 -0800 | [diff] [blame] | 11 | strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_VER, |
Ray Milkey | 5063f5b | 2018-08-15 16:22:30 -0700 | [diff] [blame] | 12 | build_file = "//tools/build/bazel:p4runtime_BUILD", |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 13 | ) |