summary refs log tree commit diff
diff options
context:
space:
mode:
authorCalum MacRae <hi@cmacr.ae>2021-03-27 12:13:42 +0000
committerCalum MacRae <hi@cmacr.ae>2021-04-16 17:19:17 +0100
commit914c604a0147a3de73919b26dc68f7a13b1239cb (patch)
tree1cad13e03cf1b4c73d5e9d25a4e0ae6ea3ee1c55
parentf8db5c60f39033c9082c34f3919d8bb287db9099 (diff)
downloadnixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.tar
nixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.tar.gz
nixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.tar.bz2
nixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.tar.lz
nixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.tar.xz
nixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.tar.zst
nixpkgs-914c604a0147a3de73919b26dc68f7a13b1239cb.zip
apple-sdk: fix PrivateFrameworks symlinks
With the absence of these symlinks, private frameworks aren't exposed
to the linker.
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix
index b88107f992c..67e9bb80da0 100644
--- a/pkgs/os-specific/darwin/apple-sdk/default.nix
+++ b/pkgs/os-specific/darwin/apple-sdk/default.nix
@@ -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
     '';
   };