anchor.diff:  
         # 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 ./
  +        GZIP=-1 tar -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})
  +      (cd $HOME && npm --registry http://www.example.com --nodedir=${sources} install $src --fetch-retries 0 ${flags})
   
         runHook postBuild
       '';
  
positive.code:           '' else ''
              cp -R ${dep}/lib/node_modules/${dep.pkgName} node_modules/
            ''
          ) deps}
  
          # Symlink peer dependencies
          ${concatMapStrings (dep: ''
            ln -sv ${dep}/lib/node_modules/${dep.pkgName} node_modules/
          '') peerDeps}
  
          # Create shims for recursive dependenceies
          ${concatMapStrings (dep: ''
  
negative.code:       mkdir -p node_modules
        ${concatMapStrings (dep: ''
          ln -sfv ${dep}/lib/node_modules/${dep.pkgName} node_modules/
        '') (attrValues requiredDependencies)}
        ${postShellHook}
      '';
  
      # Stipping does not make a lot of sense in node packages
      dontStrip = true;
  
      meta = {
        platforms = platforms;
        maintainers = [ stdenv.lib.maintainers.offline ];
      };
  
      passthru.pkgName = pkgName;
    } // (filterAttrs (n: v: all (k: n != k) ["deps" "resolvedDeps" "optionalDependencies"]) args) // {
      name = "${nodejs.interpreterName}-${name}";
  
      # Run the node setup hook when this package is a build input
      propagatedNativeBuildInputs = (args.propagatedNativeBuildInputs or []) ++ [ nodejs ];
  
      nativeBuildInputs =
        (args.nativeBuildInputs or []) ++ neededNatives ++
        (attrValues requiredDependencies);
  
      # Expose list of recursive dependencies upstream, up to the package that
      # caused recursive dependency
      recursiveDeps =
        (flatten (
          map (dep: remove name dep.recursiveDeps) (attrValues requiredDependencies)
        )) ++
        (attrNames recursiveDependencies);
    });
  
  in self
  