anchor.diff:            fi
           fi
         '';
  +      depClosure = cycles {} self;
       in concatStringsSep "\n" (
         ["runHook preConfigure"] ++
         (flip map (attrValues requiredDependencies) (dep:
  
positive.code:   # 2. Symlink all of these into node_modules.
    # 3. Extract the source of each circular dependency into node_modules.
    # 4. Make a self-referential symlink of A.
    #
    # So the first step is to compute the closure of a list of dependencies.
    # We need to keep track of the names of packages we've already
    # encountered to avoid loops.
    getCDClosure =
      # Name of the package we're building
      name:
      # List of circular dependencies.
      circularDependencies:
      let
        namesToSkip = {name = null;} // toAttrSet circularDependencies;
      in
      null;
  
    # getClosure = results: pkgList:
    #   fold (a: b: a // b) {} (
    #     for pkgList (pkg:
    #       # Don't recur if we've already found this package.
    #       if hasAttr pkg.name results then {} else
    #       # Else add the subpackage to the results set and recur on it.
    #       let results' = results // {"${pkg.name}" = pkg;}; in
    #       results' // getClosure results' (attrValues subpkg.runtimeDependencies)
    #   )
  
      # for circularDependencies (cDep:
      #   # Iterate through this dependency's runtime requirements, grabbing all of *their* runtime requirements, unless we've already seen them.
      # )
  
  in
  
  {
  
negative.code:           ${link dep}
            ${concatMapStrings link (attrValues dep.peerDependencies)}
          '')) ++
        ["runHook postConfigure"] ++
        (optional (depClosure != {}) ''
          echo Circular dependencies:
          echo ${concatStringsSep " " (map (p: p.fullName) (attrValues depClosure))}
          exit 1
        '')
      );
  
      buildPhase = ''
  