mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
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:
parent
a9ef42f33c
commit
c0d55fcc6a
1 changed files with 10 additions and 2 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue