diff options
Diffstat (limited to 'pkgs/tools/admin/google-cloud-sdk/default.nix')
-rw-r--r-- | pkgs/tools/admin/google-cloud-sdk/default.nix | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 4c6debae82b..c5e376f1c9a 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -17,39 +17,15 @@ let crcmod ] ++ lib.optional (with-gce) google-compute-engine); - baseUrl = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"; - sources = name: system: { - x86_64-darwin = { - url = "${baseUrl}/${name}-darwin-x86_64.tar.gz"; - sha256 = "0p2jpzkd0mn70wvs5m6xh9v1f5wfxww6miz2xgd50wa71kh5q9hl"; - }; - - aarch64-darwin = { - url = "${baseUrl}/${name}-darwin-arm.tar.gz"; - sha256 = "0lp5l79dm263ymm32abkz7hnfb9zwhwi9xspr2gx8h4jgpw4hmxm"; - }; - - x86_64-linux = { - url = "${baseUrl}/${name}-linux-x86_64.tar.gz"; - sha256 = "0i9h61qsd0pmvypjkmp8nzgrdr3n6wdvmizrsnm9azrsmsqbx4cl"; - }; - - i686-linux = { - url = "${baseUrl}/${name}-linux-x86.tar.gz"; - sha256 = "1cfh5bx7zcjbjqbsin4aqd10jlaibbckgjpp16lh4aywrysdfdzh"; - }; - - aarch64-linux = { - url = "${baseUrl}/${name}-linux-arm.tar.gz"; - sha256 = "0v8hrymq0iwrw936v7bll012gi20zrhjn4jjgn940y5rrdz7pk2i"; - }; - }.${system} or (throw "Unsupported system: ${system}"); + data = import ./data.nix { }; + sources = system: + data.googleCloudSdkPkgs.${system} or (throw "Unsupported system: ${system}"); in stdenv.mkDerivation rec { pname = "google-cloud-sdk"; - version = "364.0.0"; + inherit (data) version; - src = fetchurl (sources "${pname}-${version}" stdenv.hostPlatform.system); + src = fetchurl (sources stdenv.hostPlatform.system); buildInputs = [ python ]; @@ -128,8 +104,9 @@ in stdenv.mkDerivation rec { # This package contains vendored dependencies. All have free licenses. license = licenses.free; homepage = "https://cloud.google.com/sdk/"; + changelog = "https://cloud.google.com/sdk/docs/release-notes"; maintainers = with maintainers; [ iammrinal0 pradyuman stephenmw zimbatm ]; - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + platforms = builtins.attrNames data.googleCloudSdkPkgs; mainProgram = "gcloud"; }; } |