-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nodePackages: Switch to 12.x and 14.x, continue #85764 #89184
Conversation
Signed-off-by: Christian Albrecht <[email protected]>
currently LTS 12.x and Current 14.x
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.
Looks good to me, if those missing packages gets re-added.
Opened #89205 to track/remove/fix broken packages. |
Love it! 👍 Since we are regenerating |
Those are coming from npm and are not computed locally. Hence we have little control over that. However they might be an indicator for old packages, which we might want to remove. |
@prusnak, yes @Mic92 is right, that would be something that has to be tackled in Also i did the following to check the status:
|
Also the node ecosystem has bigger problem than sha1 collisions, i.e. malware. |
Indeed, but i guess that holds true for any language specific package repository e.g. python |
True also there we have more control/supervision since we handcraft all python modules. |
Thank you @prusnak for taking care of that. I totally missed that. |
12.x is still maintained by Node, but 14.15.0 became the new LTS version of Node.js. As per NixOS#89184, `nodejs` should point to the current LTS. Bump the default `nodejs` version from 12 to 14.
Motivation for this change
To continue with PR #85764 and implement suggested changes on top of that.
To be consistent with future updates of
Node.js
, i propose (and implement within this PR) on top of the suggested changes in mentionend PR, that we stick to the official releasedNode.js
versionsLTS
andCurrent
, now at 12.x and 14.x.Let us reflect that in the change of the
nodePackages
attribute in thetop-level/all-packages.nix
package set by renaming the version suffixed package set tonodePackages_latest
for the latest officialCurrent
release, andnodePackages
for the latest officialLTS
release.Things done
To ensure all node-packages build successfully, i wrote a
shell.nix
for testing.shell.nix in nixpkgs before PR (hacky, but you get the point)
With the help of this
shell.nix
i noticed there are some packages already broken in the oldnode-packages
. Namelycoc-imselect
fast-cli-1.x
git-ssb
pulp
insect
node-red
node-inspector
stf
ssb-server
and one package that claims to be incompatible withlinux
, namelyios-deploy
.So i thought about what to do if node-packages break with new releases and in different versions, and i came to the conclusion the easiest way is to mark them as
broken
in themeta
attribute depending on thenodejs.version
in use. Similar method is applicable to platform support with themeta.platforms
attribute. So we are able to write innode-packages/default.nix
e.g.To ensure that is working i came up with this
shell.nix
shell.nix in nixpkgs after PR
🎉
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)cc @Mic92 @marsam @prusnak
The broken
node-packages
need to be fixed, but i do not consider the fix being part of this PR.