darwin.CF: remove and replace with stubs

This commit is contained in:
Randy Eckenrode 2024-09-21 10:06:58 -04:00
parent 092b50a92c
commit 7a8e3bf86e
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -68,6 +68,7 @@ makeScopeWithSplicing' {
stubs = {
inherit apple_sdk apple_sdk_10_12 apple_sdk_11_0 apple_sdk_12_3;
} // lib.genAttrs [
"CF"
] (mkStub apple_sdk.version);
in
@ -199,27 +200,6 @@ impure-cmds // appleSourcePackages // stubs // {
inherit (apple_sdk) darwin-stubs;
};
# TODO: Remove the CF hook if a solution to the crashes is not found.
CF =
# CF used to refer to the open source version of CoreFoundation from the Swift
# project. As of macOS 14, the rpath-based approach allowing packages to choose
# which version to use no longer seems to work reliably. Sometimes they works,
# but sometimes they crash with the error (in the system crash logs):
# CF objects must have a non-zero isa.
# See https://developer.apple.com/forums/thread/739355 for more on that error.
#
# In this branch, we only have a single "CoreFoundation" to choose from.
# To be compatible with the existing convention, we define
# CoreFoundation with the setup hook, and CF as the same package but
# with the setup hook removed.
#
# This may seem unimportant, but without it packages (e.g., bacula) will
# fail with linker errors referring ___CFConstantStringClassReference.
# It's not clear to me why some packages need this extra setup.
lib.overrideDerivation apple_sdk.frameworks.CoreFoundation (drv: {
setupHook = null;
});
xcodeProjectCheckHook = pkgs.makeSetupHook {
name = "xcode-project-check-hook";
propagatedBuildInputs = [ pkgs.pkgsBuildHost.openssl ];