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 | 03ae0ac | 2018-10-11 08:31:59 -0700 | [diff] [blame] | 3 | P4RUNTIME_COMMIT = "a6f81ac53c6b56d75a9603690794196d67c5dc07" |
| 4 | PI_COMMIT = "539e4624f16aac39f8890a6dfb11c65040e735ad" |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 5 | |
Carmelo Cascone | 03ae0ac | 2018-10-11 08:31:59 -0700 | [diff] [blame] | 6 | P4RUNTIME_SHA = "28b79868bcfd61058cdd3f77a7a021a1add19154fa6717bf921a64cece32caf3" |
| 7 | PI_SHA = "a16024972c15e6d35466996bbb748e4b7bef819c1c93f05a0f2228062736c35a" |
Carmelo Cascone | 6a1ae71 | 2018-08-10 12:19:47 -0700 | [diff] [blame] | 8 | |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 9 | def generate_p4lang(): |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 10 | http_archive( |
| 11 | name = "com_github_p4lang_p4runtime", |
| 12 | urls = ["https://github.com/p4lang/p4runtime/archive/%s.zip" % P4RUNTIME_COMMIT], |
Carmelo Cascone | 6a1ae71 | 2018-08-10 12:19:47 -0700 | [diff] [blame] | 13 | sha256 = P4RUNTIME_SHA, |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 14 | strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_COMMIT, |
Ray Milkey | 5063f5b | 2018-08-15 16:22:30 -0700 | [diff] [blame] | 15 | build_file = "//tools/build/bazel:p4runtime_BUILD", |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 16 | ) |
Ray Milkey | 5063f5b | 2018-08-15 16:22:30 -0700 | [diff] [blame] | 17 | |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 18 | # 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 Cascone | 6a1ae71 | 2018-08-10 12:19:47 -0700 | [diff] [blame] | 22 | sha256 = PI_SHA, |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 23 | strip_prefix = "PI-%s/proto" % PI_COMMIT, |
Ray Milkey | 5063f5b | 2018-08-15 16:22:30 -0700 | [diff] [blame] | 24 | build_file = "//tools/build/bazel:pi_BUILD", |
Ray Milkey | 472d839 | 2018-05-23 17:06:51 -0700 | [diff] [blame] | 25 | ) |