2018-05-01 04:42:44 +01:00
|
|
|
{ stdenv, appleDerivation, autoreconfHook }:
|
2015-02-08 06:53:52 +00:00
|
|
|
|
|
|
|
appleDerivation {
|
2018-05-01 04:42:44 +01:00
|
|
|
postUnpack = "sourceRoot=$sourceRoot/libiconv";
|
2016-10-06 19:56:32 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
|
2018-05-01 04:42:44 +01:00
|
|
|
${stdenv.cc.bintools.targetPrefix}install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
|
2016-10-06 19:56:32 +01:00
|
|
|
|
|
|
|
# re-export one useless symbol; ld will reject a dylib that only reexports other dylibs
|
2018-05-01 04:42:44 +01:00
|
|
|
echo 'void dont_use_this(){}' | ${stdenv.cc.bintools.targetPrefix}clang -dynamiclib -x c - -current_version 2.4.0 \
|
2016-10-06 19:56:32 +01:00
|
|
|
-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
|
|
|
|
'';
|
2017-09-04 17:04:05 +01:00
|
|
|
|
2018-05-02 21:31:37 +01:00
|
|
|
setupHook = ../../../../development/libraries/libiconv/setup-hook.sh;
|
2018-03-14 21:55:27 +00:00
|
|
|
|
2017-09-04 17:04:05 +01:00
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.darwin;
|
|
|
|
};
|
2015-02-08 06:53:52 +00:00
|
|
|
}
|