git.iko.soy/typeable/nixpkgs
on master help sign in
nodePackages: add more details about the packages to include and the Node.js versions to support
commitfe9cefa7e4ed4da1a0d1d9777bf0f7145fff22e3 authorSander van der Burg <svanderburg@gmail.com> dateTue 31 Oct 2017, 11:23 (9 years ago) parent79cf1fc
1 file changed+23−2
pkgs/development/node-packages/README.md+23−2
pkgs/development/node-packages/README.md+23−2
@@ -1,13 +1,34 @@
11Node.js packages
22================
3−To add a package from [NPM](https://www.npmjs.com/) to nixpkgs:
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:
421
522 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
623 or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
7− for packagages depending on Node.js 4.x)
24+ for packages depending on Node.js 4.x)
825 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
926 3. Build your new package to test your changes:
1027 `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
1128 To build against a specific Node.js version (e.g. 4.x):
1229 `nix-build -A nodePackages_4_x.<new-or-updated-package>`
1330 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.