anchor.diff:      buildInputs = [nukeReferences cpio];
   
       buildCommand = ''
  -      mkdir -p $out/bin $out/lib
  -
  -      # Our (fake) loader
  -      cp -d ${darwin.dyld}/lib/dyld $out/lib/
  -
  -      # C standard library stuff
  -      cp -d ${darwin.Libsystem}/lib/*.o $out/lib/
  -      cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/
  +      mkdir -p $out/bin $out/lib $out/lib/system
  +
  +      # We're not going to bundle the actual libSystem.dylib; instead we reconstruct it on
  +      # the other side. See the notes in stdenv/darwin/default.nix for more information.
  +      # We also need the .o files for various low-level boot stuff.
  +      cp -d ${darwin.Libsystem}/lib/*.o $out/lib
  +      cp -d ${darwin.Libsystem}/lib/system/*.dylib $out/lib/system
   
         # Resolv is actually a link to another package, so let's copy it properly
  -      rm $out/lib/libresolv.9.dylib
         cp -L ${darwin.Libsystem}/lib/libresolv.9.dylib $out/lib
   
         cp -rL ${darwin.Libsystem}/include $out
  
positive.code: 
    # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it
    test-pkgs = let
      stdenv = import ./. { inherit system bootstrapFiles; };
    in import ../../.. {
      inherit system;
      bootStdenv = stdenv.stdenvDarwin;
    };
  
negative.code: 
        cp -rL ${llvmPackages.clang-unwrapped}/lib/clang $out/lib
  
        cp -d ${llvmPackages.libcxx}/lib/libc++*.dylib $out/lib
        cp -d ${llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib
  
        mkdir $out/include
        cp -rd ${llvmPackages.libcxx}/include/c++     $out/include
  
        cp -d ${icu.out}/lib/libicu*.dylib $out/lib
        cp -d ${zlib.out}/lib/libz.*       $out/lib
  