treewide: replace template_file rule with expand_template
Less custom rules, more good?
Change-Id: Ie6d3c0c8912ed85058cd8aadfe2e9c7689e01f79
Reviewed-on: https://review.monogon.dev/c/monogon/+/4460
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/dosfstools/dosfstools.bzl b/third_party/dosfstools/dosfstools.bzl
index e8d966d..9327fbf 100644
--- a/third_party/dosfstools/dosfstools.bzl
+++ b/third_party/dosfstools/dosfstools.bzl
@@ -1,4 +1,4 @@
-load("@@//build/utils:template_file.bzl", "template_file")
+load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
load("@rules_cc//cc:defs.bzl", "cc_binary")
cc_binary(
@@ -31,9 +31,10 @@
includes = ["."],
)
-template_file(
- name = "version.h",
- src = "src/version.h.in",
+expand_template(
+ name = "version.h_expanded",
+ template = ":src/version.h.in",
+ out = "version.h",
substitutions = {
# ONCHANGE(//build/bazel:third_party.MODULE.bazel): version needs to be kept in sync
"@PACKAGE_VERSION@": "unstable-2022-07-25",