anchor.diff:  
         runHook postPatch
       '';
  +
  +    # Compute any cycles. Remove 'self' from the dependency closure.
  +    circularDepClosure = removeAttrs (cycles {} self) [self.name];
  +
  +    # Turn the closure into a list of all circular dependencies.
  +    circulars = attrValues circularDepClosure;
  +
  +    # All of the transitive dependencies (non-circular) of the
  +    # circular packages.
  +    transCircularDeps =
  +      foldl (a: b: a // b) {} (map (p: p.runtimeDependencies) circulars);
   
       configurePhase =
       let
  
positive.code:   inherit (stdenv.lib) fold removePrefix hasPrefix subtractLists flip
                         intersectLists isAttrs listToAttrs nameValuePair hasAttr
                         mapAttrs filterAttrs attrNames elem concatMapStrings
                         attrValues concatStringsSep;
  
    # This expression builds the raw C headers and source files for the base
    # node.js installation. Node packages which use the C API for node need to
  
negative.code:           ${concatMapStrings link (attrValues dep.peerDependencies)}
          '')) ++
        ["runHook postConfigure"] ++
        (optional (circulars != []) (let
         in concatStringsSep "\n" [
          # Extract all of the circular dependencies' tarballs.
          (concatMapLines circulars (dep: ''
            echo Satisfying ${dep.fullName}, circular dependency \
              of ${self.fullName}
            mkdir -p node_modules
            if [[ ! -d node_modules/${dep.fullName} ]]; then
              tar xf ${dep.src}
              if [[ ! -d package ]]; then
                echo "Expected ${dep.src} to be a tarball containing a" \
                     "'package' directory. Don't know how to handle this :("
                exit 1
              fi
              mv package node_modules/${dep.fullName}
            fi
          ''))
          # Symlink all of the transitive dependencies of the circular packages.
          (concatMapLines (attrValues transCircularDeps) link)
          # Create a temporary symlink to the current package directory,
          # so that node knows that the dependency is satisfied when
          # checking the recursive dependencies (grumble grumble).
          "ln -s $PWD node_modules/${self.fullName}"
        ]
      )));
  
      buildPhase = concatStringsSep "\n" [
        "runHook preBuild"
        ''
        (
          # NPM reads the `HOME` environment variable and fails if it doesn't
          # exist, so set it here.
  