darwin cross: include CoreFoundation in stdenv

+15 -2
+3 -1
pkgs/stdenv/cross/default.nix
··· 48 48 # Prior overrides are surely not valid as packages built with this run on 49 49 # a different platform, and so are disabled. 50 50 overrides = _: _: {}; 51 - extraBuildInputs = [ ]; # Old ones run on wrong platform 51 + extraBuildInputs = [ ] # Old ones run on wrong platform 52 + ++ lib.optionals hostPlatform.isDarwin [ buildPackages.targetPackages.darwin.apple_sdk.frameworks.CoreFoundation ] 53 + ; 52 54 allowedRequisites = null; 53 55 54 56 hasCC = !targetPlatform.isGhcjs;
+12 -1
pkgs/top-level/all-packages.nix
··· 30 30 # just the plain stdenv. 31 31 stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv); 32 32 33 - stdenvNoCC = stdenv.override { cc = null; hasCC = false; }; 33 + stdenvNoCC = stdenv.override ( 34 + { cc = null; hasCC = false; } 35 + 36 + // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && (stdenv.hostPlatform != stdenv.buildPlatform)) { 37 + # TODO: This is a hack to use stdenvNoCC to produce a CF when cross 38 + # compiling. It's not very sound. The cross stdenv has: 39 + # extraBuildInputs = [ targetPackages.darwin.apple_sdks.frameworks.CoreFoundation ] 40 + # and uses stdenvNoCC. In order to make this not infinitely recursive, we need to exclude 41 + # this extraBuildInput. 42 + extraBuildInputs = []; 43 + } 44 + ); 34 45 35 46 mkStdenvNoLibs = stdenv: let 36 47 bintools = stdenv.cc.bintools.override {