1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00

apple-sdk: fix PrivateFrameworks symlinks

With the absence of these symlinks, private frameworks aren't exposed
to the linker.
This commit is contained in:
Calum MacRae 2021-03-27 12:13:42 +00:00
parent f8db5c60f3
commit 914c604a01
No known key found for this signature in database
GPG key ID: 53922D7E54A14F5D

View file

@ -192,6 +192,20 @@ let
mkdir -p $out/Library/Frameworks/
cp -r ${darwin-stubs}/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework \
$out/Library/Frameworks
cd $out/Library/Frameworks/${name}.framework
versions=(./Versions/*)
if [ "''${#versions[@]}" != 1 ]; then
echo "Unable to determine current version of framework ${name}"
exit 1
fi
current=$(basename ''${versions[0]})
chmod u+w -R .
ln -s "$current" Versions/Current
ln -s Versions/Current/* .
# NOTE there's no re-export checking here, this is probably wrong
'';
};