about summary refs log tree commit diff
path: root/pkgs/development/libraries/grpc
diff options
context:
space:
mode:
authorPhillip Cloud <417981+cpcloud@users.noreply.github.com>2021-10-31 06:04:02 -0400
committerPhillip Cloud <417981+cpcloud@users.noreply.github.com>2021-11-01 11:50:20 -0400
commit1a590c529c847207e510fc614fb790f6bebb25ad (patch)
tree4d0fb308c0627388759f2da0635a67d43fa8ffd3 /pkgs/development/libraries/grpc
parentf918954e0673c768ff4a3be5f38e3ff555d813bd (diff)
grpc: remove explicit cxx17 requirement coming from abseil-cpp
Diffstat (limited to 'pkgs/development/libraries/grpc')
-rw-r--r--pkgs/development/libraries/grpc/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix
index 5d2b58aa3dbac..d155826042c86 100644
--- a/pkgs/development/libraries/grpc/default.nix
+++ b/pkgs/development/libraries/grpc/default.nix
@@ -57,14 +57,14 @@ stdenv.mkDerivation rec {
     "-DgRPC_ABSL_PROVIDER=package"
     "-DBUILD_SHARED_LIBS=ON"
     "-DCMAKE_SKIP_BUILD_RPATH=OFF"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
+  ] ++ lib.optionals
+    ((stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0") [
     # Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is
     # only an issue with the useLLVM stdenv, not the darwin stdenvā€¦
     # https://github.com/grpc/grpc/issues/26473#issuecomment-860885484
-    (if (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0"
-     then "-DCMAKE_CXX_STANDARD=11"
-     else "-DCMAKE_CXX_STANDARD=17")
-  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-    "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
+    "-DCMAKE_CXX_STANDARD=11"
   ];
 
   # CMake creates a build directory by default, this conflicts with the