Merge pull request #40393 from ElvishJerricco/ios-prebuilt-dependency-fixes
Fix some GHC dependencies on iOS
This commit is contained in:
commit
f3fcf1b0a9
|
@ -59,6 +59,7 @@ nodePackages // {
|
||||||
|
|
||||||
ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
|
ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
|
||||||
preRebuild = ''
|
preRebuild = ''
|
||||||
|
LD=$CC
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
ln -s /usr/bin/xcodebuild $tmp
|
ln -s /usr/bin/xcodebuild $tmp
|
||||||
export PATH="$PATH:$tmp"
|
export PATH="$PATH:$tmp"
|
||||||
|
|
|
@ -59,6 +59,7 @@ nodePackages // {
|
||||||
|
|
||||||
ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
|
ios-deploy = nodePackages.ios-deploy.override (oldAttrs: {
|
||||||
preRebuild = ''
|
preRebuild = ''
|
||||||
|
LD=$CC
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
ln -s /usr/bin/xcodebuild $tmp
|
ln -s /usr/bin/xcodebuild $tmp
|
||||||
export PATH="$PATH:$tmp"
|
export PATH="$PATH:$tmp"
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
{ stdenv, appleDerivation }:
|
{ stdenv, appleDerivation }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
preConfigure = "cd libiconv";
|
preConfigure = "cd libiconv"
|
||||||
|
+ stdenv.lib.optionalString stdenv.hostPlatform.isiOS ''
|
||||||
|
|
||||||
|
sed -i 's/darwin\*/ios\*/g' configure libcharset/configure
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
|
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
|
# 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 \
|
-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/libiconv-nocharset.dylib \
|
||||||
-Wl,-reexport_library -Wl,$out/lib/libcharset.dylib
|
-Wl,-reexport_library -Wl,$out/lib/libcharset.dylib
|
||||||
|
|
|
@ -10811,7 +10811,7 @@ with pkgs;
|
||||||
ncurses6 = callPackage ../development/libraries/ncurses {
|
ncurses6 = callPackage ../development/libraries/ncurses {
|
||||||
abiVersion = "6";
|
abiVersion = "6";
|
||||||
};
|
};
|
||||||
ncurses = ncurses6;
|
ncurses = if hostPlatform.useiOSPrebuilt then null else ncurses6;
|
||||||
|
|
||||||
neardal = callPackage ../development/libraries/neardal { };
|
neardal = callPackage ../development/libraries/neardal { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue