darwin: add CoreFoundation to the build when explicitly required

This commit is contained in:
Andrew Childs
2021-05-17 00:27:02 +09:00
parent 3a3df3146e
commit d2c9670339
3 changed files with 28 additions and 2 deletions
@@ -129,7 +129,11 @@ in rec {
};
};
overrides = super: {};
overrides = super: {
CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: {
setupHook = ./cf-setup-hook.sh;
});
};
bareFrameworks = (
lib.mapAttrs framework (import ./frameworks.nix {
@@ -0,0 +1,6 @@
forceLinkCoreFoundationFramework() {
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}"
NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation"
}
preConfigureHooks+=(forceLinkCoreFoundationFramework)