diff options
author | Ryan Lahfa <masterancpp@gmail.com> | 2023-05-20 15:55:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 15:55:48 +0200 |
commit | 394bdf9e8c79e06ae31aff2a607b81fe4de049c5 (patch) | |
tree | 32abac07b4f50d46426a6f2d26134ad7c3e54dd7 /pkgs/servers | |
parent | 9303622c3ce3aedb097ac6636786bb89c4190b9d (diff) | |
parent | 2fffc4302003a1d84de156bde2246ee1bcd8a178 (diff) |
Merge pull request #232887 from drupol/code-servers/switch-to-nodejs-18
openvscode-server: switch to nodejs 18
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/openvscode-server/default.nix | 8 | ||||
-rw-r--r-- | pkgs/servers/openvscode-server/remove-node-download.patch | 17 |
2 files changed, 11 insertions, 14 deletions
diff --git a/pkgs/servers/openvscode-server/default.nix b/pkgs/servers/openvscode-server/default.nix index f5c17fcaff641..046a68f9d0301 100644 --- a/pkgs/servers/openvscode-server/default.nix +++ b/pkgs/servers/openvscode-server/default.nix @@ -1,12 +1,11 @@ { lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper , cacert, moreutils, jq, git, pkg-config, yarn, python3 -, esbuild, nodejs_16, libsecret, xorg, ripgrep +, esbuild, nodejs, libsecret, xorg, ripgrep , AppKit, Cocoa, Security, cctools, nixosTests }: let system = stdenv.hostPlatform.system; - nodejs = nodejs_16; yarn' = yarn.override { inherit nodejs; }; defaultYarnOpts = [ "frozen-lockfile" "non-interactive" "no-progress"]; @@ -108,9 +107,6 @@ in stdenv.mkDerivation rec { # set offline mirror to yarn cache we created in previous steps yarn --offline config set yarn-offline-mirror "${yarnCache}" - - # set nodedir, so we can build binaries later - npm config set nodedir "${nodejs}" ''; buildPhase = '' @@ -147,7 +143,7 @@ in stdenv.mkDerivation rec { # rebuild binaries, we use npm here, as yarn does not provide an alternative # that would not attempt to try to reinstall everything and break our # patching attempts - npm --prefix ./remote rebuild --build-from-source + npm --prefix ./remote rebuild --build-from-source --nodedir ${nodejs} # run postinstall scripts after patching find . -path "*node_modules" -prune -o \ diff --git a/pkgs/servers/openvscode-server/remove-node-download.patch b/pkgs/servers/openvscode-server/remove-node-download.patch index c53b79de019e4..f8df53770acc8 100644 --- a/pkgs/servers/openvscode-server/remove-node-download.patch +++ b/pkgs/servers/openvscode-server/remove-node-download.patch @@ -1,27 +1,28 @@ diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js -index a44941a1e73..5fc924cb367 100644 +index 4630eaad3cc..96b165b0949 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js -@@ -265,8 +265,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa +@@ -271,9 +271,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa .pipe(util.stripSourceMappingURL()) .pipe(jsFilter.restore); - + - const nodePath = `.build/node/v${nodeVersion}/${platform}-${arch}`; - const node = gulp.src(`${nodePath}/**`, { base: nodePath, dot: true }); - +- let web = []; if (type === 'reh-web') { -@@ -284,7 +282,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa + web = [ +@@ -290,7 +287,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa license, sources, deps, - node, ...web ); - -@@ -382,7 +379,6 @@ function tweakProductForServerWeb(product) { + +@@ -408,7 +404,6 @@ function tweakProductForServerWeb(product) { const destinationFolderName = `vscode-${type}${dashed(platform)}${dashed(arch)}`; - + const serverTaskCI = task.define(`vscode-${type}${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series( - gulp.task(`node-${platform}-${arch}`), util.rimraf(path.join(BUILD_ROOT, destinationFolderName)), |