about summary refs log tree commit diff
path: root/pkgs/development/libraries/grpc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/grpc/default.nix')
-rw-r--r--pkgs/development/libraries/grpc/default.nix23
1 files changed, 16 insertions, 7 deletions
diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix
index 2110755a1719..ee467e8ad18a 100644
--- a/pkgs/development/libraries/grpc/default.nix
+++ b/pkgs/development/libraries/grpc/default.nix
@@ -19,17 +19,25 @@
 , arrow-cpp
 }:
 
+# This package should be updated together with all related python grpc packages
+# to ensure compatibility.
+# nixpkgs-update: no auto update
 stdenv.mkDerivation rec {
   pname = "grpc";
-  version = "1.62.1"; # N.B: if you change this, please update:
-    # pythonPackages.grpcio-tools
+  version = "1.67.0"; # N.B: if you change this, please update:
+    # pythonPackages.grpcio
+    # pythonPackages.grpcio-channelz
+    # pythonPackages.grpcio-health-checking
+    # pythonPackages.grpcio-reflection
     # pythonPackages.grpcio-status
+    # pythonPackages.grpcio-testing
+    # pythonPackages.grpcio-tools
 
   src = fetchFromGitHub {
     owner = "grpc";
     repo = "grpc";
     rev = "v${version}";
-    hash = "sha256-L0bn6Bg36UKIRxznH9o4T7WXUqMwFjr8ybeQfbUi8xM=";
+    hash = "sha256-NjoSm3ZiHqe0QeVRFWO2FheoOzKjSX2oyiCM3qNUxhM=";
     fetchSubmodules = true;
   };
 
@@ -40,13 +48,14 @@ stdenv.mkDerivation rec {
       url = "https://github.com/lopsided98/grpc/commit/a9b917666234f5665c347123d699055d8c2537b2.patch";
       hash = "sha256-Lm0GQsz/UjBbXXEE14lT0dcRzVmCKycrlrdBJj+KLu8=";
     })
-  ];
+    # fix build of 1.63.0 and newer on darwin: https://github.com/grpc/grpc/issues/36654
+  ] ++ (lib.optional stdenv.hostPlatform.isDarwin ./dynamic-lookup-darwin.patch);
 
   nativeBuildInputs = [ cmake pkg-config ]
     ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) grpc;
   propagatedBuildInputs = [ c-ares re2 zlib abseil-cpp ];
   buildInputs = [ openssl protobuf ]
-    ++ lib.optionals stdenv.isLinux [ libnsl ];
+    ++ lib.optionals stdenv.hostPlatform.isLinux [ libnsl ];
 
   cmakeFlags = [
     "-DgRPC_ZLIB_PROVIDER=package"
@@ -91,12 +100,12 @@ stdenv.mkDerivation rec {
 
   env.NIX_CFLAGS_COMPILE = toString ([
     "-Wno-error"
-  ] ++ lib.optionals stdenv.isDarwin [
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
     # Workaround for https://github.com/llvm/llvm-project/issues/48757
     "-Wno-elaborated-enum-base"
   ]);
 
-  enableParallelBuilds = true;
+  enableParallelBuilding = true;
 
   passthru.tests = {
     inherit (python3.pkgs) grpcio-status grpcio-tools jaxlib;