[Nix-dev] yet another npm2nix reengineering attempt

Shea Levy shea at shealevy.com
Tue Mar 1 14:53:01 CET 2016


"including NPM dependencies is stateful" how so? Having separate 
derivations symlinked in would give you sharing, no?

On 2016-03-01 08:15, Sander van der Burg wrote:
> 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
> [1]), 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 [2]
>
> 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
>
>
>
> Links:
> ------
> [1]
> 
> http://sandervanderburg.blogspot.com/2016/02/managing-npm-flat-module-installations.html
> [2] https://github.com/svanderburg/npm2nix/tree/reengineering2
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list