From 2cac5d73ce022d2c6e82cec39b7de973c08b55c4 Mon Sep 17 00:00:00 2001 From: Nick Novitski Date: Mon, 5 Mar 2018 14:31:01 -0800 Subject: [PATCH] cloud-sql-proxy: init at 1.11 --- pkgs/tools/misc/cloud-sql-proxy/default.nix | 28 ++++++++++++ pkgs/tools/misc/cloud-sql-proxy/deps.nix | 48 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 78 insertions(+) create mode 100644 pkgs/tools/misc/cloud-sql-proxy/default.nix create mode 100644 pkgs/tools/misc/cloud-sql-proxy/deps.nix diff --git a/pkgs/tools/misc/cloud-sql-proxy/default.nix b/pkgs/tools/misc/cloud-sql-proxy/default.nix new file mode 100644 index 000000000000..5059b395610d --- /dev/null +++ b/pkgs/tools/misc/cloud-sql-proxy/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildGoPackage, fetchgit }: + +buildGoPackage rec { + name = "cloud-sql-proxy-${version}"; + version = "1.11"; + + goPackagePath = "github.com/GoogleCloudPlatform/cloudsql-proxy"; + + subPackages = [ "cmd/cloud_sql_proxy" ]; + + src = fetchgit { + rev = version; + url = "https://${goPackagePath}"; + sha256 = "13g68i51f03xdh7a1qjmj8j5ljn4drd3n44fn348xfdxqclnx90l"; + }; + + goDeps = ./deps.nix; + + buildFlagsArray = [ "-ldflags=" "-X main.versionString=${version}" ]; + + meta = with stdenv.lib; { + description = "An authenticating proxy for Second Generation Google Cloud SQL databases"; + homepage = https://github.com/GoogleCloudPlatform/cloudsql-proxy; + license = licenses.asl20; + maintainers = [ maintainers.nicknovitski ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/tools/misc/cloud-sql-proxy/deps.nix b/pkgs/tools/misc/cloud-sql-proxy/deps.nix new file mode 100644 index 000000000000..7021b4b05b23 --- /dev/null +++ b/pkgs/tools/misc/cloud-sql-proxy/deps.nix @@ -0,0 +1,48 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "bazil.org/fuse"; + fetch = { + type = "git"; + url = "https://github.com/bazil/fuse"; + rev = "65cc252bf6691cb3c7014bcb2c8dc29de91e3a7e"; + sha256 = "0qjm9yrhc5h632wwhklqzhalid4lxcm9iwsqs3jahp303rm27vpk"; + }; + } + { + goPackagePath = "cloud.google.com/go"; + fetch = { + type = "git"; + url = "https://code.googlesource.com/gocloud"; + rev = "e9284bade4f43071dac5ec56c73a03a3c9fa7772"; + sha256 = "0qm0s97bj21m04a07yni09hdh0aycgmklm5mg6flx17lrp2av9j8"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "3a7846fea0afe8cc88deb31d8cfb1fa15a3615ef"; + sha256 = "1dxvliqc79bl0waczzy8ajm7jpbnn2bszwfcd71zjjxph8jz75kg"; + }; + } + { + goPackagePath = "golang.org/x/oauth2"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/oauth2"; + rev = "cdc340f7c179dbbfa4afd43b7614e8fcadde4269"; + sha256 = "182is558nfvk4x1cm8sqzaym8kfcaaxaga9ggqhvzqrs8mncbj22"; + }; + } + { + goPackagePath = "google.golang.org/api"; + fetch = { + type = "git"; + url = "https://code.googlesource.com/google-api-go-client"; + rev = "20530fd5d65ad2caee87891f9896d7547cb400c9"; + sha256 = "06fsnml2kfzifxp2d5anb6vxjlgpkwl82xcddf0cg0v1bnx5mnrd"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24b33231f77e..d8e1943157d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -609,6 +609,8 @@ with pkgs; bonfire = callPackage ../tools/misc/bonfire { }; + cloud-sql-proxy = callPackage ../tools/misc/cloud-sql-proxy { }; + container-linux-config-transpiler = callPackage ../development/tools/container-linux-config-transpiler { }; cconv = callPackage ../tools/text/cconv { };