about summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-sdk/default.nix
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-01-20 13:25:48 +0000
committerGitHub <noreply@github.com>2020-01-20 13:25:48 +0000
commit61c018549cc2b1ca0129587942785deaaf5d6fdc (patch)
treefbce6b0232eabe14b6f4b14a15ae08fccaa352b3 /pkgs/os-specific/darwin/apple-sdk/default.nix
parent5b78ca49f2ed6224945db7421160b7696e1987f1 (diff)
parent78b34b5e5bd8e36f67a6fcd0254b174423c2ebdd (diff)
downloadnixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.tar
nixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.tar.gz
nixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.tar.bz2
nixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.tar.lz
nixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.tar.xz
nixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.tar.zst
nixlib-61c018549cc2b1ca0129587942785deaaf5d6fdc.zip
graalvm8: 19.1.1 -> 19.2.1 (#72331)
graalvm8: 19.1.1 -> 19.2.1
Diffstat (limited to 'pkgs/os-specific/darwin/apple-sdk/default.nix')
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/default.nix28
1 files changed, 15 insertions, 13 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix
index aef7341e5e9f..9890d385259c 100644
--- a/pkgs/os-specific/darwin/apple-sdk/default.nix
+++ b/pkgs/os-specific/darwin/apple-sdk/default.nix
@@ -61,9 +61,16 @@ let
     installPhase = ''
       linkFramework() {
         local path="$1"
+        local nested_path="$1"
         local dest="$out/Library/Frameworks/$path"
+        if [ "$path" == "JavaNativeFoundation.framework" ]; then
+          local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework"
+        fi
+        if [ "$path" == "JavaRuntimeSupport.framework" ]; then
+          local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework"
+        fi
         local name="$(basename "$path" .framework)"
-        local current="$(readlink "/System/Library/Frameworks/$path/Versions/Current")"
+        local current="$(readlink "/System/Library/Frameworks/$nested_path/Versions/Current")"
         if [ -z "$current" ]; then
           current=A
         fi
@@ -75,25 +82,21 @@ let
         # ApplicationServices in the 10.9 SDK
         local isChild=0
 
-        if [ -d "${sdk.out}/Library/Frameworks/$path/Versions/$current/Headers" ]; then
+        if [ -d "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" ]; then
           isChild=1
-          cp -R "${sdk.out}/Library/Frameworks/$path/Versions/$current/Headers" .
+          cp -R "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" .
         elif [ -d "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" ]; then
           current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")"
           cp -R "${sdk.out}/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"
+        ln -s -L "/System/Library/Frameworks/$nested_path/Versions/$current/$name"
+        ln -s -L "/System/Library/Frameworks/$nested_path/Versions/$current/Resources"
 
-        if [ -f "/System/Library/Frameworks/$path/module.map" ]; then
-          ln -s "/System/Library/Frameworks/$path/module.map"
+        if [ -f "/System/Library/Frameworks/$nested_path/module.map" ]; then
+          ln -s "/System/Library/Frameworks/$nested_path/module.map"
         fi
 
-        if [ $isChild -eq 1 ]; then
-          pushd "${sdk.out}/Library/Frameworks/$path/Versions/$current" >/dev/null
-        else
-          pushd "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current" >/dev/null
-        fi
+        pushd "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current" >/dev/null
         local children=$(echo Frameworks/*.framework)
         popd >/dev/null
 
@@ -109,7 +112,6 @@ let
         popd >/dev/null
       }
 
-
       linkFramework "${name}.framework"
     '';