From 6959b3f807df4f623495d63538edebb3ffd7662f Mon Sep 17 00:00:00 2001 From: mrmeku Date: Thu, 23 May 2024 14:12:36 -0600 Subject: [PATCH] fix: coreutils download path for darwin_amd64 (#853) * fix: coreutils download path for darwin_amd64 * fixup --------- Co-authored-by: Greg Magolan --- lib/private/coreutils_toolchain.bzl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/private/coreutils_toolchain.bzl b/lib/private/coreutils_toolchain.bzl index 318da6c..972fa1e 100644 --- a/lib/private/coreutils_toolchain.bzl +++ b/lib/private/coreutils_toolchain.bzl @@ -51,6 +51,8 @@ COREUTILS_VERSIONS = { "sha256": "sha256-9zGLFOMDjUDbraDY/hrE5zFJ0O+QYrvx2wHk3Gw3q/A=", }, "darwin_amd64": { + # TODO: remove this version_override hack once 0.0.27 is releases and contains a darwin arm binary + "version_override": "0.0.23", "filename": "coreutils-0.0.23-x86_64-apple-darwin.tar.gz", "sha256": "sha256-SswetVAuK/hMK1r9uBvNnKj5JpSgD0bzkbsHTxOabCo=", }, @@ -176,8 +178,11 @@ def _coreutils_platform_repo_impl(rctx): is_windows = rctx.attr.platform.startswith("windows_") platform = rctx.attr.platform filename = COREUTILS_VERSIONS[rctx.attr.version][platform]["filename"] + version = rctx.attr.version + if "version_override" in COREUTILS_VERSIONS[rctx.attr.version][platform]: + version = COREUTILS_VERSIONS[rctx.attr.version][platform]["version_override"] url = "https://github.com/uutils/coreutils/releases/download/{}/{}".format( - rctx.attr.version, + version, filename, ) rctx.download_and_extract(