-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
nodejs: Remove the requirement for dir-prefix from includes #57131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@GrahamcOfBorg build nodejs |
# support packages including just <node_version.h> | ||
mv $out/include/node/* $out/include/ | ||
rmdir $out/include/node | ||
ln -s . $out/include/node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ln -s . $out/include/node | |
ln -s $out/include $out/include/node |
I marked this as stale due to inactivity. → More info |
@clefru friendly ping |
I updated the PR as requested and tested that "npm install scrypt" compiles with nodejs-10_x (and python+gnumake+gcc+binutils installed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m a bit confused as to what the correct header installation is. Creating a symlink might not be that big a deal, but aren’t some packages simply using incorrect incorrect include statements? In that case they just have to fail and nixpkgs should not be providing workarounds for that.
Do other nodejs distribution packages generally provide both locations? I would really appreciate some background on this if possible.
@gilligan All those are valid questions. But I am sorry, I won't have time to study this topic further and my focus switched away from NodeJS. Feel free to close this PR unmerged. |
Closing. I lost context on this PR and moved on. |
Motivation for this change
"npm install scrypt" fails to compile with the compiler not being able to find "node_version.h" in the "nan" dependency. Looking at our installation, we find that we have /nix/store/.../nodejs.../include/node containing the node_version.h, so #include <node/node_version.h> would work but #include <node_version.h> doesn't. Strangely this step only fails with CXX step not with the CC.
Searching github for what's the correct way seems to find that a lot of projects just do #include <node_version.h> hence I found it ok to make our nix installation strip the node path.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)