From 1eda308a053a102f5f0f88ff03c955a4f4f236b9 Mon Sep 17 00:00:00 2001 From: Phil Freeman Date: Tue, 26 Jul 2016 12:05:56 -0700 Subject: [PATCH] Add GRPC build instructions to readme --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index a1b0c50..fcfab9b 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,43 @@ $ pip install grpcio-tools gevent $ pip install grpcio # Need to install grpcio-tools first to avoid a versioning problem ``` +Building GRPC +------------- + +In order to compile this project, and anything which depends on it, you will need a working installation +of the GRPC C core libraries. This library currently uses the 0.14 version range, so checkout an appropriate revision +of the repository, and install as follows: + +```sh +git clone https://github.com/grpc/grpc.git +git checkout 2b223977c13975648bac2f422363e1ebf83506ce +cd grpc +git submodule update --init +make +sudo make install +``` + +Alternatively, using Nix, pass the following expression to `nix-build` and point Stack to the build products in the Nix store: + +```nix +let pkgs = import {}; +in pkgs.stdenv.mkDerivation rec + { name = "grpc"; + src = pkgs.fetchgit + { url = "https://github.com/grpc/grpc.git"; + rev = "2b223977c13975648bac2f422363e1ebf83506ce"; + sha256 = "0arxjdczgj6rbg14f6x24863mrz0xgpakmdfg54zp0xp7h2pghm6"; + }; + preInstall = "export prefix"; + buildInputs = + [ pkgs.darwin.cctools + pkgs.autoconf + pkgs.automake + pkgs.libtool + pkgs.which + pkgs.zlib + + pkgs.openssl + ]; + } +```