[Nix-dev] Reengineered npm2nix: call for feedback

Wout Mertens wout.mertens at gmail.com
Mon Oct 6 23:51:42 CEST 2014


Hi sander,

phantomjs is solved, I used --linkdependencies which makes it break :)
Actually, since nix-store allows hardlinking and --linkdependencies doesn't
always work, it might be better to remove the option or at least explain
the type of errors to expect ("module not found").

node-fsevents still doesn't compile though:

building path(s)
`/nix/store/i24rrrjmmsb0pwijpr74gb8vnf61aszx-node-fsevents-0.3.0'
building /nix/store/i24rrrjmmsb0pwijpr74gb8vnf61aszx-node-fsevents-0.3.0
unpacking sources
unpacking source archive
/nix/store/5g00476f06kw0flgaarpwlxggi6rijzd-fsevents-0.3.0.tgz
source root is package
patching sources
configuring
no configure script, doing nothing
building
installing
npm WARN package.json fsevents at 0.3.0 bugs.url field must be a string url.
Deleted.
npm WARN package.json fsevents at 0.3.0 Normalized value of bugs field is an
empty object. Deleted.
npm WARN package.json fsevents at 0.3.0 homepage field must start with a
protocol.

> fsevents at 0.3.0 install
/nix/store/i24rrrjmmsb0pwijpr74gb8vnf61aszx-node-fsevents-0.3.0/lib/node_modules/fsevents
> node-gyp rebuild

make: Entering directory
`/nix/store/i24rrrjmmsb0pwijpr74gb8vnf61aszx-node-fsevents-0.3.0/lib/node_modules/fsevents/build'
building Release/obj.target/fse/fsevents.o
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:86:0:
../src/constants.cc: In function 'v8::Local<v8::Object> Constants()':
../src/constants.cc:10:113: error: no matching function for call to
'NanNew(<anonymous enum>)'
   object->Set(NanNew<v8::String>("kFSEventStreamEventFlagNone"),
NanNew<v8::Integer>(kFSEventStreamEventFlagNone));

                                     ^
../src/constants.cc:10:113: note: candidates are:
In file included from ../fsevents.cc:6:0:
../node_modules/nan/nan.h:1032:27: note: template<class T> v8::Local<T>
NanNew()
   NAN_INLINE v8::Local<T> NanNew() {
                           ^
../node_modules/nan/nan.h:1032:27: note:   template argument
deduction/substitution failed:
In file included from ../fsevents.cc:86:0:
../src/constants.cc:10:113: note:   candidate expects 0 arguments, 1
provided
   object->Set(NanNew<v8::String>("kFSEventStreamEventFlagNone"),
NanNew<v8::Integer>(kFSEventStreamEventFlagNone));

                                     ^
In file included from ../fsevents.cc:6:0:
../node_modules/nan/nan.h:1037:27: note: template<class T> v8::Local<T>
NanNew(v8::Handle<T>)
   NAN_INLINE v8::Local<T> NanNew(v8::Handle<T> arg) {
                           ^
[...]

Wout.


On Mon, Oct 6, 2014 at 11:35 PM, Sander van der Burg <svanderburg at gmail.com>
wrote:

> Hi Wout,
>
> Thanks for the feedback. Regarding some of your issues:
>
> - I'm not sure why you're having these weird issues, but if you have a
> node_modules/ folder in your working directory then it's copied into the
> build environment and it's actually used for deployment. This is because I
> also want to support packages having bundledDependencies. These kinds of
> packages also have stuff in their node_modules/ folder and I'm not allowed
> to change these to mimic NPM's behaviour. Instead, I should use them.
> - Yes ~/.npmrc is used, but that's because I use npm's package fetcher
> that seems to require it
> - About downloading: I could indeed optimize the download process a bit by
> running multiple of them at the same time. Also, if I encounter the same
> dependency a second time, still a request is made. In the future I might
> optimize this a bit. On the other hand, it should also not break anything
> so it should not be too problematic.
> - About overwriting default.nix: You can specify the following
> command-line parameter to npm2nix: --composition otherdefault.nix to have
> it named differently (see: README.md).
> - What do you mean by: 'environment definition'?
> - I haven't tried phantomjs yet, but I will have a look at it tomorrow.
> Moreover, I don't have Mac machine at home (since I don't want to buy one
> :) ), but I do have one in the office.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141006/347cb9ed/attachment-0001.html 


More information about the nix-dev mailing list