From be1d3742e8a019eddc2c2fb99e7670fda16ea8fb Mon Sep 17 00:00:00 2001 From: Victor Hugo Borja Date: Thu, 29 Sep 2022 12:35:25 -0500 Subject: [PATCH] google-cloud-sdk: Fix default component arches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a google-cloud-sdk component does not specify architectures on components.json we should fallback to all supported arches. Previously there was a bug where `allArches` were incorrectly taken from the `attrValues arches` (nixOS architectures) instead of the GCS ones using `attrNames arches`. Also added arm to the list of supported architectures. No changes needed on components.json since it looks urls and hashes were already there. Co-authored-by: Fabián Heredia Montiel --- pkgs/tools/admin/google-cloud-sdk/components.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/google-cloud-sdk/components.nix b/pkgs/tools/admin/google-cloud-sdk/components.nix index 99069fe4fd9e..4a57b99e2bae 100644 --- a/pkgs/tools/admin/google-cloud-sdk/components.nix +++ b/pkgs/tools/admin/google-cloud-sdk/components.nix @@ -11,7 +11,7 @@ let arches = { x86 = "i686"; x86_64 = "x86_64"; - # TODO arm + arm = "aarch64"; }; # Mapping from GCS component operating systems to Nix operating systems @@ -30,8 +30,8 @@ let in "${arch'}-${os'}"; - # All architectures that are supported - allArches = builtins.attrValues arches; + # All architectures that are supported by GCS + allArches = builtins.attrNames arches; # A description of all available google-cloud-sdk components. # It's a JSON file with a list of components, along with some metadata