···1Node.js packages
2================
3-To add a package from [NPM](https://www.npmjs.com/) to nixpkgs:
0000000000000000045 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
6 or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
7- for packagages depending on Node.js 4.x)
8 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
9 3. Build your new package to test your changes:
10 `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
11 To build against a specific Node.js version (e.g. 4.x):
12 `nix-build -A nodePackages_4_x.<new-or-updated-package>`
13 4. Add and commit all modified and generated files.
0000
···1Node.js packages
2================
3+The `pkgs/development/node-packages` folder contains a generated collection of
4+[NPM packages](https://npmjs.com/) that can be installed with the Nix package
5+manager.
6+7+As a rule of thumb, the package set should only provide *end user* software
8+packages, such as command-line utilities. Libraries should only be added to the
9+package set if there is a non-NPM package that requires it.
10+11+When it is desired to use NPM libraries in a development project, use the
12+`node2nix` generator directly on the `package.json` configuration file of the
13+project.
14+15+The package set also provides support for multiple Node.js versions. The policy
16+is that a new package should be added to the collection for the latest stable LTS
17+release (which is currently 6.x), unless there is an explicit reason to support
18+a different release.
19+20+To add a package from NPM to nixpkgs:
2122 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
23 or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
24+ for packages depending on Node.js 4.x)
25 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
26 3. Build your new package to test your changes:
27 `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
28 To build against a specific Node.js version (e.g. 4.x):
29 `nix-build -A nodePackages_4_x.<new-or-updated-package>`
30 4. Add and commit all modified and generated files.
31+32+For more information about the generation process, consult the
33+[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
34+tool.