google-app-engine-go-sdk: fix error on macOS

This commit is contained in:
lufia 2017-05-31 22:43:22 +09:00
parent 3b4ef34fa0
commit 0146f18390

@ -1,7 +1,9 @@
{ stdenv, fetchzip, python27, python27Packages }:
{ stdenv, fetchzip, python27, python27Packages, makeWrapper }:
assert stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin";
with python27Packages;
stdenv.mkDerivation rec {
name = "google-app-engine-go-sdk-${version}";
version = "1.9.53";
@ -17,9 +19,7 @@ stdenv.mkDerivation rec {
sha256 = "18hgl4wz3rhaklkwaxl8gm70h7l8k225f86da682kafawrr8zhv4";
};
buildInputs = with python27Packages; [
(python27.withPackages(ps: [ cffi cryptography pyopenssl ]))
];
buildInputs = [python27 makeWrapper];
installPhase = ''
mkdir -p $out/bin $out/share/
@ -27,7 +27,9 @@ stdenv.mkDerivation rec {
# create wrappers with correct env
for i in goapp appcfg.py; do
ln -s "$out/share/go_appengine/$i" "$out/bin/$i"
makeWrapper "$out/share/go_appengine/$i" "$out/bin/$i" \
--prefix PATH : "${python27}/bin" \
--prefix PYTHONPATH : "$(toPythonPath ${cffi}):$(toPythonPath ${cryptography}):$(toPythonPath ${pyopenssl})"
done
'';