2017-05-31 13:43:22 +00:00
|
|
|
{ stdenv, fetchzip, python27, python27Packages, makeWrapper }:
|
2017-05-20 18:33:57 +00:00
|
|
|
|
2017-05-31 13:43:22 +00:00
|
|
|
with python27Packages;
|
|
|
|
|
2017-05-20 18:33:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "google-app-engine-go-sdk-${version}";
|
2017-07-03 04:55:38 +00:00
|
|
|
version = "1.9.55";
|
2017-05-20 18:33:57 +00:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
|
2017-07-03 04:55:38 +00:00
|
|
|
sha256 = "1gwrmqs69h3wbx6z0a7shdr8gn1qiwrkvh3pg6mi7dybwmd1x61h";
|
2017-05-20 18:33:57 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip";
|
2017-07-03 04:55:38 +00:00
|
|
|
sha256 = "0b8r2fqg9m285ifz0jahd4wasv7cq61nr6p1k664w021r5y5lbvr";
|
2017-05-20 18:33:57 +00:00
|
|
|
};
|
|
|
|
|
2017-05-31 13:43:22 +00:00
|
|
|
buildInputs = [python27 makeWrapper];
|
2017-05-20 18:33:57 +00:00
|
|
|
|
|
|
|
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
|
2017-05-31 13:43:22 +00:00
|
|
|
makeWrapper "$out/share/go_appengine/$i" "$out/bin/$i" \
|
|
|
|
--prefix PATH : "${python27}/bin" \
|
|
|
|
--prefix PYTHONPATH : "$(toPythonPath ${cffi}):$(toPythonPath ${cryptography}):$(toPythonPath ${pyopenssl})"
|
2017-05-20 18:33:57 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Google App Engine SDK for Go";
|
|
|
|
version = version;
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://cloud.google.com/appengine/docs/go/;
|
2017-05-20 18:33:57 +00:00
|
|
|
license = licenses.asl20;
|
2017-05-31 22:09:29 +00:00
|
|
|
platforms = ["x86_64-linux" "x86_64-darwin"];
|
2017-05-20 18:33:57 +00:00
|
|
|
maintainers = with maintainers; [ lufia ];
|
|
|
|
};
|
|
|
|
}
|