[Nix-dev] Simplify node packages?

Benno Fünfstück benno.fuenfstueck at gmail.com
Tue Apr 25 09:26:05 CEST 2017


>
> The most interesting property is, that all dependency trees
> are linked together with symlinked, so they are cached by nix
> on a package level:
> https://github.com/Profpatsch/yarn2nix/blob/master/buildNodePackage.nix#L33


Does this caching really gain us that much? The disadvantage of doing this
is that we have to maintain our own scripts for doing it, since upstream
does not support it.

Perhaps a better way would be to work with upstream to allow the following
interface:

phase 1: build a directory full of tarballs (just symlink the result of
fetchurl without unpacking)
phase 2: let yarn assemble the dependency tree (thus it will deal with
cyclic dependencies for us)

This would only need a feature from upstream to use cached tarballs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170425/659176cf/attachment-0001.html>


More information about the nix-dev mailing list