nodePackages: Switch to 12.x and 14.x, continue #85764#89184
nodePackages: Switch to 12.x and 14.x, continue #85764#89184Mic92 merged 6 commits intoNixOS:masterfrom
Conversation
Signed-off-by: Christian Albrecht <christian.albrecht@mayflower.de>
currently LTS 12.x and Current 14.x
|
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.jsversionsLTSandCurrent, now at 12.x and 14.x.Let us reflect that in the change of the
nodePackagesattribute in thetop-level/all-packages.nixpackage set by renaming the version suffixed package set tonodePackages_latestfor the latest officialCurrentrelease, andnodePackagesfor the latest officialLTSrelease.Things done
To ensure all node-packages build successfully, i wrote a
shell.nixfor testing.shell.nix in nixpkgs before PR (hacky, but you get the point)
With the help of this
shell.nixi noticed there are some packages already broken in the oldnode-packages. Namelycoc-imselectfast-cli-1.xgit-ssbpulpinsectnode-rednode-inspectorstfssb-serverand 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
brokenin themetaattribute depending on thenodejs.versionin use. Similar method is applicable to platform support with themeta.platformsattribute. So we are able to write innode-packages/default.nixe.g.To ensure that is working i came up with this
shell.nixshell.nix in nixpkgs after PR
🎉
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)cc @Mic92 @marsam @prusnak
The broken
node-packagesneed to be fixed, but i do not consider the fix being part of this PR.