Merge pull request #40393 from ElvishJerricco/ios-prebuilt-dependency-fixes

Fix some GHC dependencies on iOS
This commit is contained in:
John Ericson 2018-05-16 15:04:13 -04:00 committed by GitHub
commit f3fcf1b0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View File

@ -59,6 +59,7 @@ nodePackages // {
ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
preRebuild = ''
LD=$CC
tmp=$(mktemp -d)
ln -s /usr/bin/xcodebuild $tmp
export PATH="$PATH:$tmp"

View File

@ -59,6 +59,7 @@ nodePackages // {
ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
preRebuild = ''
LD=$CC
tmp=$(mktemp -d)
ln -s /usr/bin/xcodebuild $tmp
export PATH="$PATH:$tmp"

View File

@ -1,14 +1,18 @@
{ stdenv, appleDerivation }:
appleDerivation {
preConfigure = "cd libiconv";
preConfigure = "cd libiconv"
+ stdenv.lib.optionalString stdenv.hostPlatform.isiOS ''
sed -i 's/darwin\*/ios\*/g' configure libcharset/configure
'';
postInstall = ''
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
${stdenv.cc.bintools.targetPrefix}install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
# re-export one useless symbol; ld will reject a dylib that only reexports other dylibs
echo 'void dont_use_this(){}' | clang -dynamiclib -x c - -current_version 2.4.0 \
echo 'void dont_use_this(){}' | ${stdenv.cc.bintools.targetPrefix}clang -dynamiclib -x c - -current_version 2.4.0 \
-compatibility_version 7.0.0 -current_version 7.0.0 -o $out/lib/libiconv.dylib \
-Wl,-reexport_library -Wl,$out/lib/libiconv-nocharset.dylib \
-Wl,-reexport_library -Wl,$out/lib/libcharset.dylib

View File

@ -10811,7 +10811,7 @@ with pkgs;
ncurses6 = callPackage ../development/libraries/ncurses {
abiVersion = "6";
};
ncurses = ncurses6;
ncurses = if hostPlatform.useiOSPrebuilt then null else ncurses6;
neardal = callPackage ../development/libraries/neardal { };