Hi Sander,

Sounds good to me, such a patch would definitely be welcome. If the packages 
you're adding are normally installed via npm, though, you may want to check out 
npm2nix.

Thanks,
Shea

On Feb 4, 2013, at 6:21, Sander van der Burg - EWI <[email protected]> 
wrote:

> Hi everyone,
> 
> Lately, I'm using Node.js and I wanted to create a package that requires some 
> of the NodeJS modules that we have defined in node-packages.nix. However, 
> when I add them to buildInputs, they cannot be found.
> 
> Of course, I could set the NODE_PATH environment variable in every package 
> expression that I write, but I find it more elegant when we can just add 
> these to buildInputs.
> 
> Enabling this functionality is not that hard. We just have to provide a setup 
> hook with Node.js that adds packages with a node_modules subdirectory to 
> NODE_PATH. I can implement that hook quite easily.
> 
> What do you think?
> 
> -- Sander
> 
> _______________________________________________
> nix-dev mailing list
> [email protected]
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to