From f8a933b21a1fa3d302e10157f8b2b1164133269c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 5 Jul 2020 18:04:32 +0100 Subject: [PATCH] fix(3p/grpc): Bump to 1.30.0 and build with precompiled Abseil gRPC 1.29.0 can not be built with our precompiled libs because it accidentally overrides the C++ standard specified by the users. This was fixed in 1.30.0. Change-Id: I9a0390b3f5ec8dae6c295562f3a94b3dfa681dd1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/925 Tested-by: BuildkiteCI Reviewed-by: isomer --- ci-builds.nix | 1 + third_party/grpc/default.nix | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ci-builds.nix b/ci-builds.nix index a99ecd7db..5ef6e58e0 100644 --- a/ci-builds.nix +++ b/ci-builds.nix @@ -63,6 +63,7 @@ in lib.fix (self: { third_party = with depot.third_party; [ cgit git + grpc nix openldap ]; diff --git a/third_party/grpc/default.nix b/third_party/grpc/default.nix index f76467dbd..a3745a209 100644 --- a/third_party/grpc/default.nix +++ b/third_party/grpc/default.nix @@ -1,14 +1,22 @@ { pkgs, ... }: (pkgs.originals.grpc.override { + abseil-cpp = pkgs.abseil_cpp; protobuf = pkgs.protobuf; stdenv = pkgs.llvmPackages.libcxxStdenv; -}).overrideAttrs(orig: { - buildInputs = orig.buildInputs ++ [ - pkgs.abseil_cpp - ]; +}).overrideAttrs(orig: rec { + version = "1.30.0"; + + src = pkgs.fetchFromGitHub { + owner = "grpc"; + repo = "grpc"; + rev = "v${version}"; + sha256 = "01w5jdp318i7ncxbkfv75q0mf0rd3qwfr1ycdd3850nv6mprv7n0"; + fetchSubmodules = true; + }; cmakeFlags = orig.cmakeFlags ++ [ - "-DgRPC_ABSL_PROVIDER=package" + "-DCMAKE_CXX_STANDARD=17" + "-DCMAKE_CXX_STANDARD_REQUIRED=ON" ]; })