2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchzip, python3Packages, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
with python3Packages;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "google-app-engine-go-sdk";
|
|
|
|
version = "1.9.61";
|
|
|
|
src =
|
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
|
|
|
|
sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchzip {
|
|
|
|
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip";
|
|
|
|
sha256 = "0s8sqyc72lnc7dxd4cl559gyfx83x71jjpsld3i3nbp3mwwamczp";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ python ];
|
2020-04-24 23:36:52 +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 go-app-stager *.py; do
|
|
|
|
makeWrapper "$out/share/go_appengine/$i" "$out/bin/$i" \
|
2020-11-03 02:18:15 +00:00
|
|
|
--prefix PATH : "${python}/bin" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PYTHONPATH : "$(toPythonPath ${cffi}):$(toPythonPath ${cryptography}):$(toPythonPath ${pyopenssl})"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Google App Engine SDK for Go";
|
|
|
|
version = version;
|
|
|
|
homepage = "https://cloud.google.com/appengine/docs/go/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryNativeCode # includes golang toolchain binaries
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = ["x86_64-linux" "x86_64-darwin"];
|
|
|
|
maintainers = with maintainers; [ lufia ];
|
|
|
|
};
|
|
|
|
}
|