From 1c83a06c53edfa065b8b96d2b08cb068ba4418e1 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 14 Apr 2025 20:13:04 -0400 Subject: [PATCH] solana-cli: get libc++ headers on Darwin from stdenv.cc.libcxx --- pkgs/by-name/so/solana-cli/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/so/solana-cli/package.nix b/pkgs/by-name/so/solana-cli/package.nix index c1faaafceb28..5535c8796580 100644 --- a/pkgs/by-name/so/solana-cli/package.nix +++ b/pkgs/by-name/so/solana-cli/package.nix @@ -6,7 +6,6 @@ darwin, udev, protobuf, - libcxx, rocksdb_8_3, installShellFiles, pkg-config, @@ -99,7 +98,6 @@ rustPlatform.buildRustPackage rec { ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - libcxx IOKit Security AppKit @@ -133,8 +131,8 @@ rustPlatform.buildRustPackage rec { # Require this on darwin otherwise the compiler starts rambling about missing # cmath functions - CPPFLAGS = lib.optionals stdenv.hostPlatform.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; - LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin "-L${lib.getLib libcxx}/lib"; + CPPFLAGS = lib.optionals stdenv.hostPlatform.isDarwin "-isystem ${lib.getInclude stdenv.cc.libcxx}/include/c++/v1"; + LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin "-L${lib.getLib stdenv.cc.libcxx}/lib"; # If set, always finds OpenSSL in the system, even if the vendored feature is enabled. OPENSSL_NO_VENDOR = 1;