2017-05-31 15:43:22 +02:00
|
|
|
{ stdenv, fetchzip, python27, python27Packages, makeWrapper }:
|
2017-05-20 20:33:57 +02:00
|
|
|
|
2017-05-31 15:43:22 +02:00
|
|
|
with python27Packages;
|
|
|
|
|
2017-05-20 20:33:57 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "google-app-engine-go-sdk-${version}";
|
2017-07-03 06:55:38 +02:00
|
|
|
version = "1.9.55";
|
2017-05-20 20:33:57 +02: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 06:55:38 +02:00
|
|
|
sha256 = "1gwrmqs69h3wbx6z0a7shdr8gn1qiwrkvh3pg6mi7dybwmd1x61h";
|
2017-05-20 20:33:57 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip";
|
2017-07-03 06:55:38 +02:00
|
|
|
sha256 = "0b8r2fqg9m285ifz0jahd4wasv7cq61nr6p1k664w021r5y5lbvr";
|
2017-05-20 20:33:57 +02:00
|
|
|
};
|
|
|
|
|
2017-05-31 15:43:22 +02:00
|
|
|
buildInputs = [python27 makeWrapper];
|
2017-05-20 20:33:57 +02: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 15:43:22 +02: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 20:33:57 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Google App Engine SDK for Go";
|
|
|
|
version = version;
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://cloud.google.com/appengine/docs/go/;
|
2017-05-20 20:33:57 +02:00
|
|
|
license = licenses.asl20;
|
2017-06-01 00:09:29 +02:00
|
|
|
platforms = ["x86_64-linux" "x86_64-darwin"];
|
2017-05-20 20:33:57 +02:00
|
|
|
maintainers = with maintainers; [ lufia ];
|
|
|
|
};
|
|
|
|
}
|