about summary refs log tree commit diff
path: root/third_party/cpp
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-26T15·06+0000
committerVincent Ambo <tazjin@google.com>2020-02-26T15·06+0000
commit366526eab1ae8ca2e307041fd772aee26695291c (patch)
tree3a73b3bd7470dc8756170b536e9781e767c20e60 /third_party/cpp
parent7166b3dd23b855047daafd57bdcd4edf452bd446 (diff)
feat(3p/cpp/googleapis): Add Nix build instructions r/583
Diffstat (limited to 'third_party/cpp')
-rw-r--r--third_party/cpp/googleapis/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/third_party/cpp/googleapis/default.nix b/third_party/cpp/googleapis/default.nix
new file mode 100644
index 000000000000..76a1f7ed6e30
--- /dev/null
+++ b/third_party/cpp/googleapis/default.nix
@@ -0,0 +1,24 @@
+# This library contains generated gRPC implementations for Google's
+# public libraries.
+{ pkgs, ... }:
+
+let
+  inherit (pkgs) fetchFromGitHub;
+  stdenv = with pkgs; overrideCC pkgs.stdenv clang_9;
+in stdenv.mkDerivation {
+  name = "googleapis-cpp";
+  src = ./.;
+
+  GOOGLEAPIS_DIR = fetchFromGitHub {
+    owner = "googleapis";
+    repo = "googleapis";
+    rev = "0aba1900ffef672ec5f0da677cf590ee5686e13b";
+    sha256 = "1174mvipmzap4h8as1cl44y1kq7ikipdicnmnswv5yswgkwla84c";
+  };
+
+  buildInputs = with pkgs; [
+    c-ares c-ares.cmake-config grpc protobuf openssl zlib
+  ];
+
+  nativeBuildInputs = with pkgs; [ cmake pkgconfig ];
+}