anchor.diff:  { stdenv, runCommand, nodejs, neededNatives}:
   
   {
  -  name, src,
  +  name, version ? "", src,
   
     # Node package name
  -  pkgName ? (builtins.parseDrvName name).name,
  +  pkgName ?
  +    if version != "" then stdenv.lib.removeSuffix "-${version}" name else
  +    (builtins.parseDrvName name).name,
   
     # List or attribute set of dependencies
     deps ? {},
   
     # List or attribute set of peer depencies
  -  peerDependencies ? [],
  +  peerDependencies ? {},
  +
  +  # List or attribute set of optional dependencies
  +  optionalDependencies ? {},
  +
  +  # List of optional dependencies to skip
  +  skipOptionalDependencies ? [],
   
     # Whether package is binary or library
  -  bin ? null,
  -
  -  # Flags passed to npm install
  -  flags ? [],
  +  bin ? false,
  +
  +  # Additional flags passed to npm install
  +  flags ? "",
   
     # Command to be run before shell hook
     preShellHook ? "",
   
     # Command to be run after shell hook
     postShellHook ? "",
  +
  +  # Same as https://docs.npmjs.com/files/package.json#os
  +  os ? [],
  +
  +  # Same as https://docs.npmjs.com/files/package.json#cpu
  +  cpu ? [],
   
     # Attribute set of already resolved deps (internal),
     # for avoiding infinite recursion
  
positive.code: 
        # If source was a file, repackage it, so npm pre/post publish hooks are not triggered,
        if [[ -f $src ]]; then
          tar --exclude='build-dir' -czf build-dir/package.tgz ./
          export src=$HOME/package.tgz
        else
          export src=$PWD
        fi
  
        # Install package
        (cd $HOME && npm --registry http://www.example.com --nodedir=${sources} install $src ${npmFlags})
  
        runHook postBuild
      '';
  
negative.code:               "version": "${getVersion dep}"
            }
            EOF
          '') (attrValues recursiveDependencies)}
        )
  
        export HOME=$PWD/../build-dir
        runHook postConfigure
      '';
  
  