From a908f2a3df4d76ff952af1427869946e207189e4 Mon Sep 17 00:00:00 2001 From: kadota kyohei Date: Sun, 21 May 2017 03:33:57 +0900 Subject: [PATCH] google-app-engine-go-sdk: init at 1.9.53 (#25856) * google-app-engine-go-sdk: init at 1.9.53 * google-app-engine-go-sdk: simplify python wrapper, use fetchzip * add myself to maintainer list * google-app-engine-go-sdk: add lufia as maintainer --- lib/maintainers.nix | 1 + .../google-app-engine-go-sdk/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 45 insertions(+) create mode 100644 pkgs/development/tools/google-app-engine-go-sdk/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 59675697978f..f3c0551bdc29 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -297,6 +297,7 @@ lsix = "Lancelot SIX "; lucas8 = "Luc Chabassier "; ludo = "Ludovic Courtès "; + lufia = "Kyohei Kadota "; luispedro = "Luis Pedro Coelho "; lukego = "Luke Gorrie "; lw = "Sergey Sofeychuk "; diff --git a/pkgs/development/tools/google-app-engine-go-sdk/default.nix b/pkgs/development/tools/google-app-engine-go-sdk/default.nix new file mode 100644 index 000000000000..b95906d20027 --- /dev/null +++ b/pkgs/development/tools/google-app-engine-go-sdk/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchzip, python27, python27Packages }: + +assert stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin"; + +stdenv.mkDerivation rec { + name = "google-app-engine-go-sdk-${version}"; + version = "1.9.53"; + src = + if stdenv.system == "x86_64-linux" then + fetchzip { + url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip"; + sha256 = "04lfwf7ad7gi8xn891lz87b7pr2gyycgpaq96i0cgckrj2awayz2"; + } + else + fetchzip { + url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip"; + sha256 = "18hgl4wz3rhaklkwaxl8gm70h7l8k225f86da682kafawrr8zhv4"; + }; + + buildInputs = with python27Packages; [ + (python27.withPackages(ps: [ cffi cryptography pyopenssl ])) + ]; + + installPhase = '' + mkdir -p $out/bin $out/share/ + cp -r "$src" "$out/share/go_appengine" + + # create wrappers with correct env + for i in goapp appcfg.py; do + ln -s "$out/share/go_appengine/$i" "$out/bin/$i" + done + ''; + + meta = with stdenv.lib; { + description = "Google App Engine SDK for Go"; + version = version; + homepage = "https://cloud.google.com/appengine/docs/go/"; + license = licenses.asl20; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ lufia ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bfb0d182b12d..b448450c79c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2121,6 +2121,8 @@ with pkgs; # rename to upower-notify? go-upower-notify = callPackage ../tools/misc/upower-notify { }; + google-app-engine-go-sdk = callPackage ../development/tools/google-app-engine-go-sdk { }; + google-authenticator = callPackage ../os-specific/linux/google-authenticator { }; google-cloud-sdk = callPackage ../tools/admin/google-cloud-sdk { };