treewide: format repo with buildifier

Change-Id: Ia7aebeb7bba5b119c9157d1ad805cc477bcbb68a
Reviewed-on: https://review.monogon.dev/c/monogon/+/3774
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/toolchain/cc_toolchain_config.bzl b/build/toolchain/cc_toolchain_config.bzl
index 0fdb23e..06651d4 100644
--- a/build/toolchain/cc_toolchain_config.bzl
+++ b/build/toolchain/cc_toolchain_config.bzl
@@ -14,8 +14,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool", "tool_path")
 load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
+load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool_path")
 
 all_compile_actions = [
     ACTION_NAMES.c_compile,
diff --git a/build/toolchain/llvm-efi/cc_toolchain_config.bzl b/build/toolchain/llvm-efi/cc_toolchain_config.bzl
index 076f5d9..f6de95d 100644
--- a/build/toolchain/llvm-efi/cc_toolchain_config.bzl
+++ b/build/toolchain/llvm-efi/cc_toolchain_config.bzl
@@ -1,5 +1,5 @@
-load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool", "tool_path", "with_feature_set")
 load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
+load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool_path", "with_feature_set")
 
 all_compile_actions = [
     ACTION_NAMES.c_compile,
@@ -197,7 +197,7 @@
         features = [default_link_flags_feature, default_compile_flags_feature, hybrid_gnu_msvc_feature, lto_feature],
         # Needed for various compiler built-in headers and auxiliary data. No system libraries are being used.
         cxx_builtin_include_directories = [
-            "/usr/lib/clang/18/include/"
+            "/usr/lib/clang/18/include/",
         ],
         toolchain_identifier = "k8-toolchain",
         host_system_name = "local",
diff --git a/build/toolchain/llvm-efi/transition.bzl b/build/toolchain/llvm-efi/transition.bzl
index 1edb86b..9c222e6 100644
--- a/build/toolchain/llvm-efi/transition.bzl
+++ b/build/toolchain/llvm-efi/transition.bzl
@@ -1,9 +1,9 @@
-def _build_efi_transition_impl(settings, attr):
+def _build_efi_transition_impl(_settings, _attr):
     """
     Transition that enables building for an EFI environment. Currently only supports C code.
     """
     return {
-        "//command_line_option:platforms": "//build/platforms:efi_amd64"
+        "//command_line_option:platforms": "//build/platforms:efi_amd64",
     }
 
 build_efi_transition = transition(
diff --git a/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel b/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel
index 2979ee1..dbd2982 100644
--- a/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel
+++ b/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel
@@ -1,5 +1,5 @@
-load(":musl.bzl", "musl_headers")
 load(":linux.bzl", "linux_headers")
+load(":musl.bzl", "musl_headers")
 load(":tarball.bzl", "musl_gcc_tarball")
 
 linux_headers(
diff --git a/build/toolchain/musl-host-gcc/sysroot/linux.bzl b/build/toolchain/musl-host-gcc/sysroot/linux.bzl
index e9cf40a..0d6b999 100644
--- a/build/toolchain/musl-host-gcc/sysroot/linux.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot/linux.bzl
@@ -33,7 +33,7 @@
         use_default_shell_env = True,
         command = "make -C \"$1\" headers_install ARCH=\"$2\" INSTALL_HDR_PATH=\"$(pwd)/$3\" > /dev/null && mv \"$3/include/\"* \"$3/\" && rmdir \"$3/include\"",
     )
-    return [DefaultInfo(files=depset([hdrs_dir]))]
+    return [DefaultInfo(files = depset([hdrs_dir]))]
 
 linux_headers = rule(
     implementation = _linux_headers,
diff --git a/build/toolchain/musl-host-gcc/sysroot/musl.bzl b/build/toolchain/musl-host-gcc/sysroot/musl.bzl
index 5055b83..f5dba26 100644
--- a/build/toolchain/musl-host-gcc/sysroot/musl.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot/musl.bzl
@@ -33,7 +33,7 @@
         use_default_shell_env = True,
         command = "make -C \"$1\" install-headers ARCH=\"$2\" includedir=\"$(pwd)/$3\" > /dev/null",
     )
-    return [DefaultInfo(files=depset([hdrs_dir]))]
+    return [DefaultInfo(files = depset([hdrs_dir]))]
 
 musl_headers = rule(
     implementation = _musl_headers,
diff --git a/build/toolchain/musl-host-gcc/sysroot/tarball.bzl b/build/toolchain/musl-host-gcc/sysroot/tarball.bzl
index d7f18aa..a7e407d 100644
--- a/build/toolchain/musl-host-gcc/sysroot/tarball.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot/tarball.bzl
@@ -14,17 +14,17 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-load(
-    "//build/utils:detect_root.bzl",
-    "detect_root",
-)
-
 """
 Build a sysroot-style tarball containing musl/linux headers and libraries.
 
 This can then be used to build a C toolchain that builds C/C++ binaries for Metropolis nodes.
 """
 
+load(
+    "//build/utils:detect_root.bzl",
+    "detect_root",
+)
+
 def _musl_gcc_tarball(ctx):
     tarball_name = ctx.attr.name + ".tar.xz"
     tarball = ctx.actions.declare_file(tarball_name)
@@ -37,7 +37,6 @@
     compiler_headers_path = "lib/gcc/x86_64-redhat-linux/14/include"
 
     musl_root = detect_root(ctx.attr.musl)
-    musl_files = ctx.files.musl
 
     # This builds a tarball containing musl, musl headers and linux headers.
     # This is done by some carefully crafted tar command line arguments that rewrite
@@ -50,16 +49,16 @@
 
     # Order is important here as this is a terrible hack producing a tar file with duplicate files. The decompressor
     # will then overwrite the wrong one with the correct one for us.
-    arguments += [compiler_headers_path]
+    arguments.append(compiler_headers_path)
     command += " --transform 's|^'$2'|include|' /$2"
 
-    arguments += [musl_headers_path]
+    arguments.append(musl_headers_path)
     command += " --transform 's|^'$3'|include|' $3"
 
-    arguments += [linux_headers_path]
+    arguments.append(linux_headers_path)
     command += " --transform 's|^'$4'|include|' $4"
 
-    arguments += [musl_root]
+    arguments.append(musl_root)
     command += " --transform 's|^'$5'|lib|' $5"
 
     ctx.actions.run_shell(
diff --git a/build/toolchain/musl-host-gcc/sysroot_repository.bzl b/build/toolchain/musl-host-gcc/sysroot_repository.bzl
index 253abbf..72882ea 100644
--- a/build/toolchain/musl-host-gcc/sysroot_repository.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot_repository.bzl
@@ -30,7 +30,6 @@
 )
 """)
 
-
 musl_sysroot_rule = repository_rule(
     implementation = _musl_sysroot_rule_impl,
     attrs = {