2015-02-08 06:53:52 +00:00
|
|
|
{ stdenv, appleDerivation }:
|
|
|
|
|
|
|
|
appleDerivation {
|
|
|
|
preConfigure = "cd libiconv";
|
2016-10-06 19:56:32 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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 \
|
|
|
|
-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
|
|
|
|
'';
|
2015-02-08 06:53:52 +00:00
|
|
|
}
|