anchor.diff:          # The other responsibilities of NPM are kept -- version checks, build
           # steps, postprocessing etc.
           
  +        export HOME=$TMPDIR
           cd ${name}
  -        export HOME=$TMPDIR
  +        npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
           npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
           
           # Create symlink to the deployed executable folder, if applicable
  
positive.code: {stdenv, python, nodejs, utillinux, runCommand}:
  
  let
    # Function that generates a TGZ file from a NPM project
  
negative.code:       
        buildPhase = args.buildPhase or "true";
        
        compositionScript = composePackage args;
        passAsFile = [ "compositionScript" ];
        
        installPhase = args.installPhase or ''
          # Create and enter a root node_modules/ folder
          mkdir -p $out/lib/node_modules
          cd $out/lib/node_modules
            
          # Compose the package and all its dependencies
          source $compositionScriptPath
          
          # Patch the shebangs of the bundled modules to prevent them from
          # calling executables outside the Nix store as much as possible
  