From 7f39165cca05d34ac547b179a58f311d4f46440c Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Wed, 28 Aug 2024 09:44:41 +0200 Subject: [PATCH] grpc: 1.62.1 -> 1.66.1 Diff: https://github.com/grpc/grpc/compare/v1.62.1...v1.66.1 Changelog: https://github.com/grpc/grpc/releases/tag/v1.66.1 --- pkgs/development/libraries/grpc/default.nix | 7 ++++--- .../libraries/grpc/dynamic-lookup-darwin.patch | 11 +++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/libraries/grpc/dynamic-lookup-darwin.patch 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)