python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / admin / google-cloud-sdk / update.sh
bloba9ed0a47227797e766077f3cf72c6c8726066e19
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
9 VERSION="408.0.1"
11 function genMainSrc() {
12 local url="${BASE_URL}-${VERSION}-${1}-${2}.tar.gz"
13 local sha256
14 sha256=$(nix-prefetch-url "$url")
15 echo " {"
16 echo " url = \"${url}\";"
17 echo " sha256 = \"${sha256}\";"
18 echo " };"
22 cat <<EOF
23 # DO NOT EDIT! This file is generated automatically by update.sh
24 { }:
26 version = "${VERSION}";
27 googleCloudSdkPkgs = {
28 EOF
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"
42 echo " i686-linux ="
43 genMainSrc "linux" "x86"
45 echo " };"
46 echo "}"
48 } >data.nix
50 curl "${CHANNEL_URL}/components-v${VERSION}.json" -w "\n" > components.json