[Nix-dev] yet another npm2nix reengineering attempt

Sander van der Burg svanderburg at gmail.com
Tue Mar 1 14:15:50 CET 2016


Hi,

I don't know how many of you have noticed my latest blog post (
http://sandervanderburg.blogspot.com/2016/02/managing-npm-flat-module-installations.html),
but I did yet another reengineering attempt for npm2nix. Its main objective
is to also support npm 3.x's flat module installations (npm 3.x comes with
Node.js 5.x).

In the second reengineered version, I compute the entire dependency graph
ahead of time and build the entire set of dependencies in one derivation --
there is no good reason to make them individual Nix packages, because
including NPM dependencies is stateful.

The new reengineered version supports both Node.js 4.x and 5.x. By default,
it generates expressions for 4.x (I made this the default, since 4.x is the
LTS release):

$ npm2nix

Adding the -5 parameter causes it to generate expressions for Node.js 5.x:

$ npm2nix -5

The code lives in the same repository as the old reengineering version, but
in a different branch:

https://github.com/svanderburg/npm2nix/tree/reengineering2

There is a README.md file that describes how to use it and demonstrates a
few common use cases.

The flat module installation works for many of my packages but it is still
not 100% perfect. My blog post describes some of its limitations.

Anyway, I'm announcing this new version so that I can gather feedback.
Maybe this new implementation is not what people are actually looking for,
but I'm eating my own dogfood with it now and for all my own projects it
works fine.

Regards,

Sander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160301/c591d075/attachment.html 


More information about the nix-dev mailing list