anchor.diff:        cp -d ${xz.out}/lib/liblzma*.*     $out/lib
   
         # Copy binutils.
  -      for i in as ld ar ranlib nm strip otool install_name_tool lipo; do
  +      for i in as ld ar ranlib nm strip otool install_name_tool lipo codesign_allocate; do
           cp ${cctools_}/bin/$i $out/bin
         done
   
         cp -d ${darwin.libtapi}/lib/libtapi* $out/lib
   
  -      cp -rd ${pkgs.darwin.CF}/Library $out
  +      ${lib.optionalString targetPlatform.isx86_64 ''
  +        cp -rd ${pkgs.darwin.CF}/Library $out
  +      ''}
   
         chmod -R u+w $out
   
         nuke-refs $out/bin/*
   
         rpathify() {
  -        local libs=$(${cctools_}/bin/otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
  +        local libs=$(${stdenv.cc.targetPrefix}otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
  +        local newlib
           for lib in $libs; do
  -          ${cctools_}/bin/install_name_tool -change $lib "@rpath/$(basename $lib)" "$1"
  +          newlib=''${lib:${toString (storePrefixLen + 1)}}
  +          newlib=''${newlib#*/}
  +          ${stdenv.cc.targetPrefix}install_name_tool -change $lib "@rpath/$newlib" "$1"
           done
         }
   
  
positive.code: 
        # Copy what we need of clang
        cp -d ${llvmPackages.clang-unwrapped}/bin/clang* $out/bin
  
        cp -rL ${llvmPackages.clang-unwrapped.lib}/lib/clang $out/lib
  
        cp -d ${llvmPackages.libcxx}/lib/libc++*.dylib $out/lib
        cp -d ${llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib
        cp -d ${llvmPackages.llvm.lib}/lib/libLLVM.dylib $out/lib
        cp -d ${libffi}/lib/libffi*.dylib $out/lib
  
        mkdir $out/include
        cp -rd ${llvmPackages.libcxx.dev}/include/c++     $out/include
  
        cp -d ${darwin.ICU}/lib/libicu*.dylib $out/lib
        cp -d ${zlib.out}/lib/libz.*       $out/lib
  
negative.code:       cp ${bzip2_.bin}/bin/bzip2 $out/on-server
  
        chmod u+w $out/on-server/*
        ${stdenv.cc.targetPrefix}strip $out/on-server/*
        nuke-refs $out/on-server/*
  
        (cd $out/pack && (find | cpio -o -H newc)) | bzip2 > $out/on-server/bootstrap-tools.cpio.bz2
  