diff --git a/jsaddle-wkwebview/default.nix b/jsaddle-wkwebview/default.nix index f1cf1e54..1db94ce1 100644 --- a/jsaddle-wkwebview/default.nix +++ b/jsaddle-wkwebview/default.nix @@ -7,8 +7,16 @@ mkDerivation { version = "0.9.4.0"; src = ./.; libraryHaskellDepends = [ aeson base bytestring jsaddle data-default ]; - libraryFrameworkDepends = with buildPackages; if hostPlatform.useiOSCross or false then [ - (assert osx_sdk != null; osx_sdk) + + # HACK(matthewbauer): Make sure framework is pulled in first so that + # CoreFoundation is correct. Eventually we will update + # CoreFoundation in Nixpkgs but that has caused some other issues. + preBuild = stdenv.lib.optionalString hostPlatform.useiOSPrebuilt '' + NIX_CFLAGS_COMPILE="-F${buildPackages.darwin.xcode_8_2}/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks" + ''; + + libraryFrameworkDepends = with buildPackages; if hostPlatform.useiOSPrebuilt then [ + "${darwin.xcode_8_2}/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System" ] else [ darwin.libobjc darwin.apple_sdk.libs.xpc