1 #!/usr/bin/env nix-shell
2 #! nix-shell -i bash -p nix
4 CHANNEL_URL
="https://dl.google.com/dl/cloudsdk/channels/rapid"
5 BASE_URL
="$CHANNEL_URL/downloads/google-cloud-sdk"
7 # Version of Google Cloud SDK from
8 # https://cloud.google.com/sdk/docs/release-notes
11 function genMainSrc
() {
12 local url
="${BASE_URL}-${VERSION}-${1}-${2}.tar.gz"
14 sha256
=$
(nix-prefetch-url
"$url")
16 echo " url = \"${url}\";"
17 echo " sha256 = \"${sha256}\";"
23 # DO NOT EDIT! This file is generated automatically by update.sh
26 version = "${VERSION}";
27 googleCloudSdkPkgs = {
30 echo " x86_64-linux ="
31 genMainSrc
"linux" "x86_64"
33 echo " x86_64-darwin ="
34 genMainSrc
"darwin" "x86_64"
36 echo " aarch64-linux ="
37 genMainSrc
"linux" "arm"
39 echo " aarch64-darwin ="
40 genMainSrc
"darwin" "arm"
43 genMainSrc
"linux" "x86"
50 curl
"${CHANNEL_URL}/components-v${VERSION}.json" -w "\n" > components.json