1 { lib, stdenv, fetchzip, python3Packages, makeWrapper }:
5 stdenv.mkDerivation rec {
6 pname = "google-app-engine-go-sdk";
9 if stdenv.hostPlatform.system == "x86_64-linux" then
11 url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
12 sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs";
16 url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip";
17 sha256 = "0s8sqyc72lnc7dxd4cl559gyfx83x71jjpsld3i3nbp3mwwamczp";
20 nativeBuildInputs = [ makeWrapper ];
21 buildInputs = [ python ];
24 mkdir -p $out/bin $out/share/
25 cp -r "$src" "$out/share/go_appengine"
27 # create wrappers with correct env
28 for i in goapp go-app-stager *.py; do
29 makeWrapper "$out/share/go_appengine/$i" "$out/bin/$i" \
30 --prefix PATH : "${python}/bin" \
31 --prefix PYTHONPATH : "$(toPythonPath ${cffi}):$(toPythonPath ${cryptography}):$(toPythonPath ${pyopenssl})"
36 description = "Google App Engine SDK for Go";
38 homepage = "https://cloud.google.com/appengine/docs/go/";
39 sourceProvenance = with sourceTypes; [
41 binaryNativeCode # includes golang toolchain binaries
43 license = licenses.asl20;
44 platforms = ["x86_64-linux" "x86_64-darwin"];
45 maintainers = with maintainers; [ lufia ];