diff options
author | Anthony Cowley <acowley@gmail.com> | 2016-03-11 15:11:02 -0500 |
---|---|---|
committer | Anthony Cowley <acowley@gmail.com> | 2016-04-15 18:21:33 -0400 |
commit | ca1d46f98a71d3b21de0b9a30f759a7af2514f61 (patch) | |
tree | 4e95e185018e894d21cdcf6a49872bf0b44e2037 /pkgs/os-specific/darwin/apple-sdk/default.nix | |
parent | 970d80b0ff5390e97ce72f0ff576cd088e57d9b0 (diff) | |
download | nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.tar nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.tar.gz nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.tar.bz2 nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.tar.lz nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.tar.xz nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.tar.zst nixlib-ca1d46f98a71d3b21de0b9a30f759a7af2514f61.zip |
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.
Diffstat (limited to 'pkgs/os-specific/darwin/apple-sdk/default.nix')
-rw-r--r-- | pkgs/os-specific/darwin/apple-sdk/default.nix | 24 |
1 files changed, 22 insertions, 2 deletions
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 |