The nixfromnpm package

Given an npm package name and one or more npm repositories, will dump out a
collection of nix files, one each for the initial package and all of its
dependencies. Will generate a top-level default.nix which returns a set
containing all of these expressions. Subsequent invocations of the program
using the same target directory will result in re-use of the existing files,
to avoid unnecessary duplication.