From ca1d46f98a71d3b21de0b9a30f759a7af2514f61 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Fri, 11 Mar 2016 15:11:02 -0500 Subject: ApplicationServices: add CoreGraphics child The AVFoundation framework uses a relative path that presumes that CoreGraphics is a child framework of ApplicationServices. It is not in the 10.9 SDK. This patch makes it one by tweaking the framework derivation generator with special support to address this problem. --- pkgs/os-specific/darwin/apple-sdk/default.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'pkgs/os-specific/darwin/apple-sdk/default.nix') diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index c18d3f6cc6d3..c1e09c201114 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -66,7 +66,18 @@ let mkdir -p "$dest" pushd "$dest" >/dev/null - cp -R "${sdk}/Library/Frameworks/$path/Versions/$current/Headers" . + # Keep track of if this is a child or a child rescue as with + # ApplicationServices in the 10.9 SDK + local isChild + + if [ -d "${sdk}/Library/Frameworks/$path/Versions/$current/Headers" ]; then + isChild=1 + cp -R "${sdk}/Library/Frameworks/$path/Versions/$current/Headers" . + else + isChild=0 + current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")" + cp -R "${sdk}/Library/Frameworks/$name.framework/Versions/$current/Headers" . + fi ln -s -L "/System/Library/Frameworks/$path/Versions/$current/$name" ln -s -L "/System/Library/Frameworks/$path/Versions/$current/Resources" @@ -74,8 +85,17 @@ let ln -s "/System/Library/Frameworks/$path/module.map" fi - pushd "${sdk}/Library/Frameworks/$path/Versions/$current" >/dev/null + if [ $isChild -eq 1 ]; then + pushd "${sdk}/Library/Frameworks/$path/Versions/$current" >/dev/null + else + pushd "${sdk}/Library/Frameworks/$name.framework/Versions/$current" >/dev/null + fi local children=$(echo Frameworks/*.framework) + if [ "$name" == "ApplicationServices" ]; then + # Fixing up ApplicationServices which is missing + # CoreGraphics in the 10.9 SDK + children="$children Frameworks/CoreGraphics.framework" + fi popd >/dev/null for child in $children; do -- cgit 1.4.1