From b7442b90668d49ac5c3717a5b1cfae0dda4bb334 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 21 Aug 2024 07:50:34 -0400 Subject: [PATCH] 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. --- pkgs/stdenv/adapters.nix | 2 -- pkgs/stdenv/cross/default.nix | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 4289bcaeb991..45d87a6d1f83 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -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 "") diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 13fb71c214ff..bf67d2f1a225 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -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;