From 9b8a14bb7e1d10b413a96b0c7c5c6e09243bd9b7 Mon Sep 17 00:00:00 2001 From: Aaron Olson <934893+honkfestival@users.noreply.github.com> Date: Fri, 21 Feb 2020 12:28:54 -0500 Subject: [PATCH] google-cloud-sdk: fix Darwin build by only stripping local symbols (#80554) Darwin won't strip relocatable symbols, so strip only local symbols from cygrpc.so See also https://github.com/NixOS/nixpkgs/commit/6ceebc441c43c0fd0ef5c61058c1c8ec3b93bc02#commitcomment-37355193 --- pkgs/tools/admin/google-cloud-sdk/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 326d15a9318e..1d37f71f0a83 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -30,6 +30,8 @@ let }; }.${system}; + strip = if stdenv.isDarwin then "strip -x" else "strip"; + in stdenv.mkDerivation rec { pname = "google-cloud-sdk"; version = "268.0.0"; @@ -93,7 +95,7 @@ in stdenv.mkDerivation rec { done # strip the Cython gRPC library - strip $out/google-cloud-sdk/lib/third_party/grpc/_cython/cygrpc.so + ${strip} $out/google-cloud-sdk/lib/third_party/grpc/_cython/cygrpc.so ''; meta = with stdenv.lib; {