Skip to content

Commit

Permalink
add nodejs 18.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-martin committed May 30, 2024
1 parent 3b5f6ee commit 299e924
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions main/nodejs/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in
nodejs-16-20-2 = nodeCheck { packageName = "nodejs-16-20-2"; node = "16.20.2"; yarn = "1.22.19"; pnpm = "8.5.1"; };
nodejs-18-17-1 = nodeCheck { packageName = "nodejs-18-17-1"; node = "18.17.1"; yarn = "1.22.19"; pnpm = "8.6.12"; };
nodejs-18-18-0 = nodeCheck { packageName = "nodejs-18-18-0"; node = "18.18.0"; yarn = "1.22.19"; pnpm = "8.8.0"; };
nodejs-18-20-2 = nodeCheck { packageName = "nodejs-18-20-2"; node = "18.20.2"; yarn = "1.22.22"; pnpm = "8.15.5"; };
nodejs-20-11-0 = nodeCheck { packageName = "nodejs-20-11-0"; node = "20.11.0"; yarn = "1.22.19"; pnpm = "8.14.0"; };
nodejs-20-11-1 = nodeCheck { packageName = "nodejs-20-11-1"; node = "20.11.1"; yarn = "1.22.19"; pnpm = "8.15.1"; };
}
22 changes: 20 additions & 2 deletions main/nodejs/v18.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ let
inherit (import inputs.nixpkgs-stable { inherit system; config = { }; }) symlinkJoin runCommand;
in
rec {
# 18.18.0 is not recommended due to https://github.com/webpack-contrib/thread-loader/issues/191
nodejs-18-x = nodejs-18-17-x;
nodejs-18-x = nodejs-18-20-x;

nodejs-18-17-x = nodejs-18-17-1;
nodejs-18-18-x = nodejs-18-18-0;
nodejs-18-20-x = nodejs-18-20-2;

nodejs-18-17-1 = (
let
Expand Down Expand Up @@ -44,4 +44,22 @@ rec {
paths = [ nodejs pnpm pnpm-bin yarn ];
}
);

nodejs-18-20-2 = (
let
nixpkgs = import inputs.nixpkgs-unstable-2024-05-30 { inherit system; config = { }; };
nodejs = nixpkgs.nodejs_18;
yarn = nixpkgs.yarn.override { inherit nodejs; };
pnpm = nixpkgs.nodePackages.pnpm.override { inherit nodejs; };
pnpm-bin = runCommand "pnpm" { } ''
mkdir -p "$out/bin"
ln -s "${pnpm}/lib/node_modules/.bin/pnpm" "$out/bin/pnpm"
ln -s "${pnpm}/lib/node_modules/.bin/pnpx" "$out/bin/pnpx"
'';
in
symlinkJoin {
name = "nodejs";
paths = [ nodejs pnpm pnpm-bin yarn ];
}
);
}

0 comments on commit 299e924

Please sign in to comment.