From fc8fbab87fead3d42ba5849ab50decf2f35aafcf Mon Sep 17 00:00:00 2001 From: Ilya Kolpakov Date: Thu, 16 Nov 2017 11:12:55 +0100 Subject: [PATCH] google-cloud-sdk: don't repeat base download url --- pkgs/tools/admin/google-cloud-sdk/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 3622b981cc4f..ee62b1b84f19 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -5,19 +5,20 @@ let pythonInputs = [ cffi cryptography pyopenssl crcmod google-compute-engine ]; pythonPath = lib.makeSearchPath python.sitePackages pythonInputs; + baseUrl = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"; sources = name: system: { i686-linux = { - url = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${name}-linux-x86.tar.gz"; + url = "${baseUrl}/${name}-linux-x86.tar.gz"; sha256 = "0aq938s1w9mzj60avmcc68kgll54pl7635vl2mi89f6r56n0xslp"; }; x86_64-darwin = { - url = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${name}-darwin-x86_64.tar.gz"; + url = "${baseUrl}/${name}-darwin-x86_64.tar.gz"; sha256 = "13k2i1svry9q800s1jgf8jss0rzfxwk6qci3hsy1wrb9b2mwlz5g"; }; x86_64-linux = { - url = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${name}-linux-x86_64.tar.gz"; + url = "${baseUrl}/${name}-linux-x86_64.tar.gz"; sha256 = "1kvaz8p1iflsi85wwi7lb6km6frj70xsricyz1ah0sw3q71zyqmc"; }; }.${system};