From 465706255f1d32e15f8feba2a28e6d4ab5d9fe8b Mon Sep 17 00:00:00 2001 From: Timothy Gallion Date: Sun, 5 Nov 2023 11:31:03 -0500 Subject: [PATCH] grpc: explicitly use the build platform for `grpc_cpp_plugin` when cross building grpc use the build platform `grpc_cpp_plugin` to generate the internal protos --- pkgs/development/libraries/grpc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 0532907ac153..84c3abd575ce 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -64,6 +64,7 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc" + "-D_gRPC_CPP_PLUGIN=${buildPackages.grpc}/bin/grpc_cpp_plugin" ] # The build scaffold defaults to c++14 on darwin, even when the compiler uses # a more recent c++ version by default [1]. However, downgrades are