From 0146f18390d8619db97178771297fb04136cdb7b Mon Sep 17 00:00:00 2001 From: lufia Date: Wed, 31 May 2017 22:43:22 +0900 Subject: [PATCH] google-app-engine-go-sdk: fix error on macOS --- .../tools/google-app-engine-go-sdk/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/google-app-engine-go-sdk/default.nix b/pkgs/development/tools/google-app-engine-go-sdk/default.nix index b95906d20027..eebc416e2828 100644 --- a/pkgs/development/tools/google-app-engine-go-sdk/default.nix +++ b/pkgs/development/tools/google-app-engine-go-sdk/default.nix @@ -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 '';