NixOS/nixpkgs — pull request #4850 by lethalman (2014-11-06 01:20:09+00:00)
Title: node: fix builds similar to sqlite3 where modules are bundled

sqlite3 bundles node-pre-gyp. Since the tar.gz itself being installed with npm install is not patched and thus shebangs are not patched. The sqlite3 npm install will call node-pre-gyp binary and fail because shebang is not patched.

This commit patches shebangs of the sources and repacks the sources for `npm install`. Note that there's a special case where the source can be a directory... don't know why but I get a directory for the ghost npm, not a tgz.

Bonus for merging: going to add a ghost service for NixOS :-)

cc @svanderburg