diff --git a/pkgs/os-specific/darwin/cctools-port/default.nix b/pkgs/os-specific/darwin/cctools-port/default.nix index 0d40409a9944..cdc259c1e2a0 100644 --- a/pkgs/os-specific/darwin/cctools-port/default.nix +++ b/pkgs/os-specific/darwin/cctools-port/default.nix @@ -1,5 +1,6 @@ { stdenv, cross, fetchurl, autoconf, automake, libtool , libcxx, llvm, clang, openssl, libuuid +, maloader, makeWrapper, xctoolchain }: stdenv.mkDerivation rec { @@ -13,7 +14,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ - autoconf automake libtool libcxx llvm clang openssl libuuid + autoconf automake libtool libcxx llvm clang openssl libuuid makeWrapper ]; patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ]; @@ -47,6 +48,14 @@ stdenv.mkDerivation rec { "--target=${cross.config}" ]; + postInstall = '' + for tool in dyldinfo dwarfdump dsymutil; do + makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${cross.config}-$tool" \ + --add-flags "${xctoolchain}/bin/$tool" + ln -s "$out/bin/${cross.config}-$tool" "$out/bin/$tool" + done + ''; + meta = { homepage = "http://www.opensource.apple.com/source/cctools/"; description = "Mac OS X Compiler Tools (cross-platform port)"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6ea2cbc3fee..9109e1e59522 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6554,6 +6554,8 @@ let darwin = rec { cctools = forceNativeDrv (callPackage ../os-specific/darwin/cctools-port { cross = assert crossSystem != null; crossSystem; + inherit maloader; + xctoolchain = xcode.toolchain; }); maloader = callPackage ../os-specific/darwin/maloader {