openvscode-server: switch to nodejs 18

This commit is contained in:
Pol Dellaiera 2023-05-19 21:55:04 +02:00
parent 4a22f6f0a4
commit 2fffc43020
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA
3 changed files with 12 additions and 14 deletions

View File

@ -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 \

View File

@ -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)),

View File

@ -34952,6 +34952,7 @@ with pkgs;
vscodium-fhsWithPackages = vscodium.fhsWithPackages;
openvscode-server = callPackage ../servers/openvscode-server {
nodejs = nodejs_18;
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;
inherit (darwin) cctools;
};