Skip to content

Commit 6959b3f

Browse files
mrmekugregmagolan
andauthored
fix: coreutils download path for darwin_amd64 (#853)
* fix: coreutils download path for darwin_amd64 * fixup --------- Co-authored-by: Greg Magolan <greg@aspect.dev>
1 parent 474e680 commit 6959b3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/private/coreutils_toolchain.bzl

+6-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ COREUTILS_VERSIONS = {
5151
"sha256": "sha256-9zGLFOMDjUDbraDY/hrE5zFJ0O+QYrvx2wHk3Gw3q/A=",
5252
},
5353
"darwin_amd64": {
54+
# TODO: remove this version_override hack once 0.0.27 is releases and contains a darwin arm binary
55+
"version_override": "0.0.23",
5456
"filename": "coreutils-0.0.23-x86_64-apple-darwin.tar.gz",
5557
"sha256": "sha256-SswetVAuK/hMK1r9uBvNnKj5JpSgD0bzkbsHTxOabCo=",
5658
},
@@ -176,8 +178,11 @@ def _coreutils_platform_repo_impl(rctx):
176178
is_windows = rctx.attr.platform.startswith("windows_")
177179
platform = rctx.attr.platform
178180
filename = COREUTILS_VERSIONS[rctx.attr.version][platform]["filename"]
181+
version = rctx.attr.version
182+
if "version_override" in COREUTILS_VERSIONS[rctx.attr.version][platform]:
183+
version = COREUTILS_VERSIONS[rctx.attr.version][platform]["version_override"]
179184
url = "https://github.com/uutils/coreutils/releases/download/{}/{}".format(
180-
rctx.attr.version,
185+
version,
181186
filename,
182187
)
183188
rctx.download_and_extract(

0 commit comments

Comments
 (0)