From c0d55fcc6ab1ac2c634e2b518440b26378b7abd7 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 10 Mar 2014 21:46:09 +0100 Subject: 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 --- pkgs/os-specific/darwin/xcode/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'pkgs/os-specific/darwin/xcode') diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 671e73a0fa5..5c8e7a3ef6c 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -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 = { -- cgit 1.4.1