Lorenz Brun | 80deba5 | 2022-02-24 17:07:13 +0100 | [diff] [blame^] | 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 2 | |
| 3 | def intel_ucode_external(name, version): |
| 4 | sums = { |
| 5 | "20220207": "532527bd17f3ea6664452b536699818a3bf896e4ace689a43a73624711b7c921", |
| 6 | } |
| 7 | all_content = """ |
| 8 | # Anything other than family 6 is not interesting to us |
| 9 | filegroup(name = "fam6h", srcs = glob(["intel-ucode/06-*"]), visibility = ["//visibility:public"]) |
| 10 | """ |
| 11 | |
| 12 | http_archive( |
| 13 | name = name, |
| 14 | build_file_content = all_content, |
| 15 | sha256 = sums[version], |
| 16 | strip_prefix = "Intel-Linux-Processor-Microcode-Data-Files-microcode-" + version, |
| 17 | urls = ["https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/refs/tags/microcode-%s.tar.gz" % version], |
| 18 | ) |