3
0
Fork 0
forked from mirrors/nixpkgs

google-cloud-sdk: don't repeat base download url

This commit is contained in:
Ilya Kolpakov 2017-11-16 11:12:55 +01:00
parent 1f6a0e9b76
commit fc8fbab87f

View file

@ -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};