darwin-frameworks: add hook for private frameworks to CoreMIDI

Some parts of CoreMIDI depend on private frameworks, this enables eg.
adding -framework MultitouchSupport to a build.
This commit is contained in:
Daiderd Jordan 2018-03-17 13:58:41 +01:00
parent 5693c5da8e
commit adf11dcc01
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 15 additions and 0 deletions

View File

@ -210,6 +210,13 @@ in rec {
];
});
CoreMIDI = stdenv.lib.overrideDerivation super.CoreMIDI (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/PrivateFrameworks/"
];
setupHook = ./private-frameworks-setup-hook.sh;
});
Security = stdenv.lib.overrideDerivation super.Security (drv: {
setupHook = ./security-setup-hook.sh;
});

View File

@ -0,0 +1,8 @@
addPrivateFrameworks() {
flag="-F/System/Library/PrivateFrameworks"
if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then
NIX_CFLAGS_COMPILE+=" $flag"
fi
}
addEnvHooks "$hostOffset" addPrivateFrameworks