Ah a path issue! Well spotted! I only discovered this new feature of NPM while writing my blog post and realized that I have only tested absolute paths so far, not relative paths. I'll implement a fix for this soon!
On Thu, Oct 16, 2014 at 11:36 PM, Colin Putney <[email protected]> wrote: > > > On Tue, Sep 30, 2014 at 3:13 AM, Sander van der Burg < > [email protected]> wrote: > > >> I've used the reengineered npm2nix on a private project for the company I >> work for, as well as some other utilities and it seems to work fine for me. >> >> Hopefully, you can also try npm2nix on your projects to find out whether >> there any additional issues. :) >> >> Furthermore, I'm still working a blog post to rationalize all the stuff, >> which should give you better insights in the problem, details and the >> choices I made. >> >> Let me know what you think! >> > > Hi Sander, > > I've just tried out this version and I'm finding it pleasant improvement > over the old way. The generated code is clean and simple, and I like the > minimal dependency it has on nixpkgs. > > However, there's one thing I haven't been able to get working: local path > dependencies. > > I have several node apps that rely on a collection of node modules. These > modules may, in turn rely on other modules. In addition, both the apps and > the modules depend on modules from npm. My current setup involves > generating nix expressions using npm2nix (Sheay's version) to get the NPM > dependencies, then hand-editing the default.nix files for each app and > module, to pull in the additional dependencies that don't come from npm. > > As of NPM 2.0, dependencies can be specified as paths on the local file > system, and I'd like to use that feature to generate nix expressions for > both local and npm dependencies using npm2nix. It almost works, but not > quite. AFAICT, the nix expressions are generated just fine, but then when > the derivation is being created, the relative paths are resolved against > the current directory of the of the process, rather than against the > directory that contains the package.json file. That causes the derivation > to fail with ENOENT. > > All in all, looks like big improvement! > > Colin > > >
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
