mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
Don't trigger the evaluation of apple-sdk in Linux stdenv
During the Apple SDK revamp of #346043, cc-wrapper and bintools-wrapper were modified to automatically add a fallback SDK if $DEVELOPER_DIR is not set [^1]. However, because of the order of the && operands, apple-sdk is always evaluated even when it's not needed. Flip the && operands so we only trigger the evaluation when targeting Darwin. [^1]:51755b0c00(cherry picked from commit5953ae56d8)
This commit is contained in:
committed by
github-actions[bot]
parent
f2b166b813
commit
5a465d9e8f
@@ -492,7 +492,7 @@ stdenvNoCC.mkDerivation {
|
||||
darwinMinVersionVariable
|
||||
;
|
||||
}
|
||||
// lib.optionalAttrs (apple-sdk != null && stdenvNoCC.targetPlatform.isDarwin) {
|
||||
// lib.optionalAttrs (stdenvNoCC.targetPlatform.isDarwin && apple-sdk != null) {
|
||||
# Wrapped compilers should do something useful even when no SDK is provided at `DEVELOPER_DIR`.
|
||||
fallback_sdk = apple-sdk.__spliced.buildTarget or apple-sdk;
|
||||
};
|
||||
|
||||
@@ -889,7 +889,7 @@ stdenvNoCC.mkDerivation {
|
||||
# These will become empty strings when not targeting Darwin.
|
||||
inherit (targetPlatform) darwinMinVersion darwinMinVersionVariable;
|
||||
}
|
||||
// lib.optionalAttrs (apple-sdk != null && stdenvNoCC.targetPlatform.isDarwin) {
|
||||
// lib.optionalAttrs (stdenvNoCC.targetPlatform.isDarwin && apple-sdk != null) {
|
||||
# Wrapped compilers should do something useful even when no SDK is provided at `DEVELOPER_DIR`.
|
||||
fallback_sdk = apple-sdk.__spliced.buildTarget or apple-sdk;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user