xcode: Provide the commandline toolchain as well.

This toolchain contains Mach-O binaries and might not be useful in the
first place, but there are programs like dsymutil, where Apple didn't
release the source code, so we need a Mach-O loader...

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-03-10 21:46:09 +01:00
parent a9ef42f33c
commit c0d55fcc6a
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
outputs = [ "out" "toolchain" ];
unpackCmd = let
basePath = "Xcode.app/Contents/Developer/Platforms/MacOSX.platform";
@ -25,8 +26,15 @@ stdenv.mkDerivation rec {
installPhase = ''
ensureDir "$out/share/sysroot"
cp -a * "$out/share/sysroot/"
ln -s "$out/usr/lib" "$out/lib"
ln -s "$out/usr/include" "$out/include"
ln -s "$out/share/sysroot/usr/lib" "$out/lib"
ln -s "$out/share/sysroot/usr/include" "$out/include"
ensureDir "$toolchain"
pushd "$toolchain"
${xpwn}/bin/hfsplus "$(dirs +1)/../main.hfs" extractall \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr \
> /dev/null
popd
'';
meta = {