From 24de73c6d17f939c4a88db86fcbd22be546e4e53 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Wed, 30 Aug 2023 10:57:53 +0200 Subject: [PATCH] fix(rust): always include Security on Darwin Signed-off-by: Roman Volosatovs --- lib/rust/mkAttrs.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/rust/mkAttrs.nix b/lib/rust/mkAttrs.nix index f9c99ad2..8615c67e 100644 --- a/lib/rust/mkAttrs.nix +++ b/lib/rust/mkAttrs.nix @@ -287,8 +287,14 @@ with self.lib.rust.targets; useRosetta = final.stdenv.buildPlatform.isDarwin && final.stdenv.buildPlatform.isAarch64 && pkgsCross.stdenv.hostPlatform.isDarwin && pkgsCross.stdenv.hostPlatform.isx86_64; useEmu = final.stdenv.buildPlatform.system != pkgsCross.stdenv.hostPlatform.system && !useRosetta && pkgsCross.stdenv.hostPlatform.system != aarch64-darwin; + buildInputs = optional final.stdenv.buildPlatform.isDarwin final.darwin.apple_sdk.frameworks.Security; + targetArgs = { + inherit + buildInputs + ; + CARGO_BUILD_TARGET = target; } // optionalAttrs pkgsCross.stdenv.hostPlatform.isLinux { @@ -360,7 +366,7 @@ with self.lib.rust.targets; // optionalAttrs (doCheck && target == aarch64-apple-darwin) { doCheck = warn "testing not currently supported when cross-compiling for `${target}`" false; } - // optionalAttrs (doCheck && pkgsCross.stdenv.hostPlatform.isDarwin && !final.stdenv.hostPlatform.isDarwin) { + // optionalAttrs (doCheck && pkgsCross.stdenv.hostPlatform.isDarwin && !final.stdenv.buildPlatform.isDarwin) { doCheck = warn "testing not currently supported when cross-compiling for `${target}` from non-Darwin platform" false; } // optionalAttrs (doCheck && useEmu) (