| Serge Bazanski | 72c1f2b | 2024-06-04 13:42:48 +0000 | [diff] [blame^] | 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 2 | |
| 3 | def swtpm_external(name, version): |
| 4 | sums = { |
| 5 | # master at 2024/06/04 |
| 6 | "0c9a6c4a12a63b86ab472e69e95bd75853d4fa96": "169ddb139597fa808e112d452457445c79ed521bb34f999066d20de9214056ce", |
| 7 | } |
| 8 | |
| 9 | http_archive( |
| 10 | name = name, |
| 11 | patch_args = ["-p1"], |
| 12 | patches = [ |
| 13 | "//third_party/swtpm/patches:0001-bazel-compat-glib.h-glib-glib.h.patch", |
| 14 | "//third_party/swtpm/patches:0002-swtpm_localca-replace-gmp-mpz-dependency-with-boring.patch", |
| 15 | "//third_party/swtpm/patches:0003-swtpm_setup-replace-dep-on-JSON-GLib-with-sheredom-j.patch", |
| 16 | "//third_party/swtpm/patches:0004-bazel-support-implement.patch", |
| 17 | ], |
| 18 | sha256 = sums[version], |
| 19 | strip_prefix = "swtpm-" + version, |
| 20 | urls = ["https://github.com/stefanberger/swtpm/archive/%s.tar.gz" % version], |
| 21 | ) |