darwin cross: include CoreFoundation in stdenv

This commit is contained in:
Andrew Childs
2021-05-17 00:27:01 +09:00
parent 9e05276949
commit a7bcb6b936
2 changed files with 15 additions and 2 deletions
+12 -1
View File
@@ -30,7 +30,18 @@ in
# just the plain stdenv.
stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv);
stdenvNoCC = stdenv.override { cc = null; hasCC = false; };
stdenvNoCC = stdenv.override (
{ cc = null; hasCC = false; }
// lib.optionalAttrs (stdenv.hostPlatform.isDarwin && (stdenv.hostPlatform != stdenv.buildPlatform)) {
# TODO: This is a hack to use stdenvNoCC to produce a CF when cross
# compiling. It's not very sound. The cross stdenv has:
# extraBuildInputs = [ targetPackages.darwin.apple_sdks.frameworks.CoreFoundation ]
# and uses stdenvNoCC. In order to make this not infinitely recursive, we need to exclude
# this extraBuildInput.
extraBuildInputs = [];
}
);
mkStdenvNoLibs = stdenv: let
bintools = stdenv.cc.bintools.override {