darwin.stdenv: provide an SDK when cross-compiling

Static can rely on the standard cross-SDK because it will be a static
SDK when building for static targets.
This commit is contained in:
Randy Eckenrode 2024-08-21 07:50:34 -04:00
parent 9c004ef367
commit b7442b9066
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9
2 changed files with 1 additions and 3 deletions

View File

@ -137,8 +137,6 @@ rec {
# Best effort static binaries. Will still be linked to libSystem,
# but more portable than Nix store binaries.
makeStaticDarwin = stdenv: stdenv.override (old: {
# extraBuildInputs are dropped in cross.nix, but darwin still needs them
extraBuildInputs = [ pkgs.buildPackages.darwin.CF ];
mkDerivationFromStdenv = withOldMkDerivation old (stdenv: mkDerivationSuper: args:
(mkDerivationSuper args).overrideAttrs (prevAttrs: {
NIX_CFLAGS_LINK = toString (prevAttrs.NIX_CFLAGS_LINK or "")

View File

@ -75,7 +75,7 @@ in lib.init bootStages ++ [
baseStdenv = stdenvNoCC.override {
# Old ones run on wrong platform
extraBuildInputs = lib.optionals hostPlatform.isDarwin [
buildPackages.targetPackages.darwin.apple_sdk.frameworks.CoreFoundation
buildPackages.targetPackages.apple-sdk
];
hasCC = !stdenvNoCC.targetPlatform.isGhcjs;