2020-10-31 22:02:46 +00:00
|
|
|
{ stdenv, fetchzip, python3Packages, makeWrapper }:
|
2017-05-20 19:33:57 +01:00
|
|
|
|
2020-10-31 22:02:46 +00:00
|
|
|
with python3Packages;
|
2017-05-31 14:43:22 +01:00
|
|
|
|
2017-05-20 19:33:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "google-app-engine-go-sdk";
|
2017-12-22 02:37:22 +00:00
|
|
|
version = "1.9.61";
|
2017-05-20 19:33:57 +01:00
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2017-05-20 19:33:57 +01:00
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
|
2017-12-22 02:37:22 +00:00
|
|
|
sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs";
|
2017-05-20 19:33:57 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip";
|
2017-12-22 02:37:22 +00:00
|
|
|
sha256 = "0s8sqyc72lnc7dxd4cl559gyfx83x71jjpsld3i3nbp3mwwamczp";
|
2017-05-20 19:33:57 +01:00
|
|
|
};
|
|
|
|
|
2020-10-31 22:02:46 +00:00
|
|
|
buildInputs = [ python makeWrapper ];
|
2017-05-20 19:33:57 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/
|
|
|
|
cp -r "$src" "$out/share/go_appengine"
|
|
|
|
|
|
|
|
# create wrappers with correct env
|
2017-12-22 02:37:22 +00:00
|
|
|
for i in goapp go-app-stager *.py; do
|
2017-05-31 14:43:22 +01:00
|
|
|
makeWrapper "$out/share/go_appengine/$i" "$out/bin/$i" \
|
2020-10-31 22:02:46 +00:00
|
|
|
--prefix PATH : "${python}/bin" \
|
2017-05-31 14:43:22 +01:00
|
|
|
--prefix PYTHONPATH : "$(toPythonPath ${cffi}):$(toPythonPath ${cryptography}):$(toPythonPath ${pyopenssl})"
|
2017-05-20 19:33:57 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Google App Engine SDK for Go";
|
|
|
|
version = version;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://cloud.google.com/appengine/docs/go/";
|
2017-05-20 19:33:57 +01:00
|
|
|
license = licenses.asl20;
|
2017-05-31 23:09:29 +01:00
|
|
|
platforms = ["x86_64-linux" "x86_64-darwin"];
|
2017-05-20 19:33:57 +01:00
|
|
|
maintainers = with maintainers; [ lufia ];
|
|
|
|
};
|
|
|
|
}
|