Skip to content

Commit

Permalink
Merge pull request #96963 from doronbehar/doc/nodejs
Browse files Browse the repository at this point in the history
doc: nodejs: Update override example to use overlays
  • Loading branch information
rnhmjoj committed Sep 4, 2020
2 parents f55650b + c67bcd2 commit 2b575c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/languages-frameworks/node.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ build system it uses. Here are some examples:

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.nix`:
requires `node-gyp-build`, so [we override](https://github.com/NixOS/nixpkgs/blob/32f5e5da4a1b3f0595527f5195ac3a91451e9b56/pkgs/development/node-packages/default.nix#L37-L40) its expression in [`default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/default.nix):

```nix
dat = nodePackages.dat.override (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
});
dat = super.dat.override {
buildInputs = [ self.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ];
meta.broken = since "12";
};
```

To add a package from NPM to nixpkgs:
Expand Down

0 comments on commit 2b575c5

Please sign in to comment.