Add DYLD_LIBRARY_PATH to executable environments during postInstall (#81)

This commit is contained in:
Joel Stanley 2016-12-12 15:45:58 -06:00 committed by GitHub Enterprise
parent c02546f696
commit 90b010d5cb
1 changed files with 7 additions and 0 deletions

View File

@ -231,6 +231,13 @@ let
--prefix PATH : ${ghc}/bin
'';
postInstall = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
wrapProgram $out/bin/hellos-client --prefix DYLD_LIBRARY_PATH : ${grpc}/lib
wrapProgram $out/bin/hellos-server --prefix DYLD_LIBRARY_PATH : ${grpc}/lib
wrapProgram $out/bin/echo-client --prefix DYLD_LIBRARY_PATH : ${grpc}/lib
wrapProgram $out/bin/echo-server --prefix DYLD_LIBRARY_PATH : ${grpc}/lib
'';
shellHook =
pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
export DYLD_LIBRARY_PATH=${grpc}/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH