Skip to content

Commit

Permalink
fix(rust): always include Security on Darwin
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Aug 30, 2023
1 parent 6e3340e commit 24de73c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/rust/mkAttrs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) (
Expand Down

0 comments on commit 24de73c

Please sign in to comment.