summary refs log tree commit diff
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2017-12-21 14:33:44 +0100
committerGitHub <noreply@github.com>2017-12-21 14:33:44 +0100
commit8135068dfedcb5aefc8f211325b47a9071633748 (patch)
tree3326fd70223bbe44710d9a33bed27ab602436ef3
parenta0a8daeae214551c5eaf97c06d897dfc1a703fce (diff)
parenta3330a9b96b391d55785bb73e6752a7de142740a (diff)
downloadnixlib-8135068dfedcb5aefc8f211325b47a9071633748.tar
nixlib-8135068dfedcb5aefc8f211325b47a9071633748.tar.gz
nixlib-8135068dfedcb5aefc8f211325b47a9071633748.tar.bz2
nixlib-8135068dfedcb5aefc8f211325b47a9071633748.tar.lz
nixlib-8135068dfedcb5aefc8f211325b47a9071633748.tar.xz
nixlib-8135068dfedcb5aefc8f211325b47a9071633748.tar.zst
nixlib-8135068dfedcb5aefc8f211325b47a9071633748.zip
Merge pull request #32940 from MatrixAI/nodepackagesreadme
nodePackages: Added instructions to README about packages with binary addons
-rw-r--r--pkgs/development/node-packages/README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/node-packages/README.md b/pkgs/development/node-packages/README.md
index 79f180759b09..17a203ed12be 100644
--- a/pkgs/development/node-packages/README.md
+++ b/pkgs/development/node-packages/README.md
@@ -17,6 +17,23 @@ is that a new package should be added to the collection for the latest stable LT
 release (which is currently 6.x), unless there is an explicit reason to support
 a different release.
 
+If your package uses native addons, you need to examine what kind of native
+build system it uses. Here are some examples:
+
+* `node-gyp`
+* `node-gyp-builder`
+* `node-pre-gyp`
+
+After you have identified the correct system, you need to override your package
+expression while adding in build system as a build input. For example, `dat`
+requires `node-gyp-build`, so we override its expression in `default-v6.nix`:
+
+```nix
+dat = nodePackages.dat.override (oldAttrs: {
+  buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
+});
+```
+
 To add a package from NPM to nixpkgs:
 
  1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update