anchor.diff:        ${lib.optionalString targetPlatform.isAarch64 ''
           # copy .tbd assembly utils
           cp -d ${pkgs.darwin.rewrite-tbd}/bin/rewrite-tbd $out/bin
  -        cp -d ${pkgs.libyaml}/lib/libyaml*.dylib $out/lib
  +        cp -d ${lib.getLib pkgs.libyaml}/lib/libyaml*.dylib $out/lib
   
           # copy package extraction tools
           cp -d ${pkgs.pbzx}/bin/pbzx $out/bin
  -        cp -d ${pkgs.xar}/lib/libxar*.dylib $out/lib
  +        cp -d ${lib.getLib pkgs.xar}/lib/libxar*.dylib $out/lib
           cp -d ${pkgs.bzip2.out}/lib/libbz2*.dylib $out/lib
   
           # copy sigtool
  
positive.code:         cp -d ${pkgs.darwin.sigtool}/bin/codesign $out/bin
        ''}
  
        cp -d ${darwin.ICU}/lib/libicu*.dylib $out/lib
        cp -d ${zlib.out}/lib/libz.*       $out/lib
        cp -d ${gmpxx.out}/lib/libgmp*.*   $out/lib
        cp -d ${xz.out}/lib/liblzma*.*     $out/lib
  
negative.code: 
        ${lib.optionalString stdenv.targetPlatform.isx86_64 ''
          # Copy libSystem's .o files for various low-level boot stuff.
          cp -d ${lib.getLib darwin.Libsystem}/lib/*.o $out/lib
  
          # Resolv is actually a link to another package, so let's copy it properly
          cp -L ${lib.getLib darwin.Libsystem}/lib/libresolv.9.dylib $out/lib
  
          cp -rL ${darwin.Libsystem}/include $out
          chmod -R u+w $out/include
  