diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 2110755a1719..831fbe6884ad 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { pname = "grpc"; - version = "1.62.1"; # N.B: if you change this, please update: + version = "1.66.1"; # N.B: if you change this, please update: # pythonPackages.grpcio-tools # pythonPackages.grpcio-status @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { owner = "grpc"; repo = "grpc"; rev = "v${version}"; - hash = "sha256-L0bn6Bg36UKIRxznH9o4T7WXUqMwFjr8ybeQfbUi8xM="; + hash = "sha256-CmQUUbIYPWRS7q7OX+TmkTvoqtJAUEwhL/lev8JdB8U="; fetchSubmodules = true; }; @@ -40,7 +40,8 @@ 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; diff --git a/pkgs/development/libraries/grpc/dynamic-lookup-darwin.patch b/pkgs/development/libraries/grpc/dynamic-lookup-darwin.patch new file mode 100644 index 000000000000..d72ffcc72190 --- /dev/null +++ b/pkgs/development/libraries/grpc/dynamic-lookup-darwin.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 053b9e3784..0979b504da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38083,3 +38083,6 @@ generate_pkgconfig( + "-lgrpcpp_otel_plugin" + "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_wire_lib -lupb_message_lib -lutf8_range_lib -lupb_mini_descriptor_lib -lupb_mem_lib -lupb_base_lib" + "grpcpp_otel_plugin.pc") ++ ++target_link_options(upb_textformat_lib PRIVATE -Wl,-undefined,dynamic_lookup) ++target_link_options(upb_json_lib PRIVATE -Wl,-undefined,dynamic_lookup)