Skip to content

Commit

Permalink
reinstate libiconv/libcharset wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Jude Taylor committed Oct 6, 2016
1 parent 4589a8d commit 3dee596
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@

appleDerivation {
preConfigure = "cd libiconv";

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
'';
}

2 comments on commit 3dee596

@copumpkin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and sorry about that! Can you add a comment saying what this is doing so we don't come back next year and delete it again assuming that it's no longer needed? 😄

@matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented on 3dee596 Jun 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also interested in why this is there. Apple won't let us submit to the App Store with things referencing this symbol. Apparently _locale_charset is considered a "private" symbol.

Please sign in to comment.