From dc878b3ffb516511386901b0ca465c9ef3a8eb72 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:43:03 +0100 Subject: [PATCH] solana-cli: fix eval on Darwin --- pkgs/by-name/so/solana-cli/package.nix | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/so/solana-cli/package.nix b/pkgs/by-name/so/solana-cli/package.nix index d7dbfcb0c77e..654a6c95b2e5 100644 --- a/pkgs/by-name/so/solana-cli/package.nix +++ b/pkgs/by-name/so/solana-cli/package.nix @@ -59,6 +59,18 @@ rustPlatform.buildRustPackage rec { env = { RUSTFLAGS = "-Amismatched_lifetime_syntaxes -Adead_code -Aunused_parens"; LIBCLANG_PATH = "${libclang.lib}/lib"; + + # Used by build.rs in the rocksdb-sys crate. If we don't set these, it would + # try to build RocksDB from source. + ROCKSDB_LIB_DIR = "${rocksdb}/lib"; + + # Require this on darwin otherwise the compiler starts rambling about missing + # cmath functions + CPPFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-isystem ${lib.getInclude stdenv.cc.libcxx}/include/c++/v1"; + LDFLAGS = lib.optionalString 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; }; # Even tho the tests work, a shit ton of them try to connect to a local RPC @@ -99,20 +111,6 @@ rustPlatform.buildRustPackage rec { find . -name libsolana_program.rlib -exec cp {} $out/bin/deps \; ''; - env = { - # Used by build.rs in the rocksdb-sys crate. If we don't set these, it would - # try to build RocksDB from source. - ROCKSDB_LIB_DIR = "${rocksdb}/lib"; - - # Require this on darwin otherwise the compiler starts rambling about missing - # cmath functions - 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; - }; - meta = { description = "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces"; homepage = "https://solana.com";