Skip to content

Commit 93bcab7

Browse files
committed
build: updated node.js to v18
This is needed for compatability with `js-db` [ci skip]
1 parent 48adbca commit 93bcab7

File tree

4 files changed

+25
-32
lines changed

4 files changed

+25
-32
lines changed

pkgs.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import (
2-
let rev = "ce6aa13369b667ac2542593170993504932eb836"; in
2+
let rev = "f294325aed382b66c7a188482101b0f336d1d7db"; in
33
builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"
44
)

release.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
name = "${utils.basename}-${version}-linux-${arch}";
99
version = utils.node2nixDev.version;
1010
src = "${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}";
11-
nativeBuildInputs = [ utils.nodejs ];
11+
nativeBuildInputs = [ nodejs ];
1212
PKG_CACHE_PATH = utils.pkgCachePath;
1313
PKG_IGNORE_TAG = 1;
1414
buildPhase = ''
@@ -29,7 +29,7 @@ let
2929
name = "${utils.basename}-${version}-win-${arch}.exe";
3030
version = utils.node2nixDev.version;
3131
src = "${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}";
32-
nativeBuildInputs = [ utils.nodejs ];
32+
nativeBuildInputs = [ nodejs ];
3333
PKG_CACHE_PATH = utils.pkgCachePath;
3434
PKG_IGNORE_TAG = 1;
3535
buildPhase = ''
@@ -50,7 +50,7 @@ let
5050
name = "${utils.basename}-${version}-macos-${arch}";
5151
version = utils.node2nixDev.version;
5252
src = "${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}";
53-
nativeBuildInputs = [ utils.nodejs ];
53+
nativeBuildInputs = [ nodejs ];
5454
PKG_CACHE_PATH = utils.pkgCachePath;
5555
PKG_IGNORE_TAG = 1;
5656
buildPhase = ''

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let
66
in
77
mkShell {
88
nativeBuildInputs = [
9-
utils.nodejs
9+
nodejs
1010
shellcheck
1111
grpc-tools
1212
grpcurl

utils.nix

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{ runCommandNoCC
22
, linkFarm
33
, nix-gitignore
4-
, nodejs-16_x
4+
, nodejs
5+
, node2nix
56
, pkgs
67
, lib
78
, fetchurl
89
, fetchFromGitHub
910
}:
1011

1112
rec {
12-
# Fix nodejs version
13-
nodejs = nodejs-16_x;
1413
# This removes the org scoping
1514
basename = builtins.baseNameOf node2nixDev.packageName;
1615
# Filter source to only what's necessary for building
@@ -30,14 +29,6 @@ rec {
3029
"/jest.config.js"
3130
] ./.;
3231
nodeVersion = builtins.elemAt (lib.versions.splitVersion nodejs.version) 0;
33-
# Custom node2nix directly from GitHub
34-
node2nixSrc = fetchFromGitHub {
35-
owner = "svanderburg";
36-
repo = "node2nix";
37-
rev = "9377fe4a45274fab0c7faba4f7c43ffae8421dd2";
38-
sha256 = "15zip9w9hivd1p6k82hh4zba02jj6q0g2f1i9b7rrn2hs70qdlai";
39-
};
40-
node2nix = (import "${node2nixSrc}/release.nix" {}).package.x86_64-linux;
4132
node2nixDrv = dev: runCommandNoCC "node2nix" {} ''
4233
mkdir $out
4334
${node2nix}/bin/node2nix \
@@ -78,28 +69,29 @@ rec {
7869
'';
7970
});
8071
pkgBuilds = {
81-
"3.4" = {
72+
"3.5" = {
8273
"linux-x64" = fetchurl {
83-
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-linux-x64";
84-
sha256 = "sR98InYftgwoXMU6I1Jt9+flVmMy06Xdgpi/lcudU9A=";
74+
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.5/node-v18.15.0-linux-x64";
75+
sha256 = "0glr88p9higdwsffg3l243kpixqcf1mb7fawq62rj9n7b275lwx4";
8576
};
8677
"win32-x64" = fetchurl {
87-
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-win-x64";
88-
sha256 = "tH4L7ENiaBbVVNbVDSiRMayGpleNp91pFiCPNKiFqpc=";
78+
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.5/node-v18.15.0-win-x64";
79+
sha256 = "1d51w02m5jv7fgk3brkv3wizn1l75rai1zyq8m9vlm1za1gaha8p";
8980
};
9081
"macos-x64" = fetchurl {
91-
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-macos-x64";
92-
sha256 = "PlOsskHRucHXPz9Ip2BMYNpJR+TTdlG77A0GMB4jNts=";
93-
};
94-
"macos-arm64" = fetchurl {
95-
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-macos-arm64";
96-
sha256 = "VNCPKjPQjLhzyX8d/FJ/dvDQcA9Gv9YZ6Wf2EcDCARI=";
82+
url = "https://github.com/vercel/pkg-fetch/releases/download/v3.5/node-v18.15.0-macos-x64";
83+
sha256 = "1qcih9l3vncg05glhr45avcz2p5sqk7sp9776q4133xg88s09k0k";
9784
};
85+
# No build for v18.15.0 macos-arm64 build
86+
# "macos-arm64" = fetchurl {
87+
# url = "https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-macos-arm64";
88+
# sha256 = "VNCPKjPQjLhzyX8d/FJ/dvDQcA9Gv9YZ6Wf2EcDCARI=";
89+
# };
9890
};
9991
};
10092
pkgCachePath =
10193
let
102-
pkgBuild = pkgBuilds."3.4";
94+
pkgBuild = pkgBuilds."3.5";
10395
fetchedName = n: builtins.replaceStrings ["node"] ["fetched"] n;
10496
in
10597
linkFarm "pkg-cache"
@@ -116,9 +108,10 @@ rec {
116108
name = fetchedName pkgBuild.macos-x64.name;
117109
path = pkgBuild.macos-x64;
118110
}
119-
{
120-
name = fetchedName pkgBuild.macos-arm64.name;
121-
path = pkgBuild.macos-arm64;
122-
}
111+
# No build for v18.15 macos-arm64 build
112+
# {
113+
# name = fetchedName pkgBuild.macos-arm64.name;
114+
# path = pkgBuild.macos-arm64;
115+
# }
123116
];
124117
}

0 commit comments

Comments
 (0)