Merge pull request #232887 from drupol/code-servers/switch-to-nodejs-18

openvscode-server: switch to nodejs 18
This commit is contained in:
Ryan Lahfa 2023-05-20 15:55:48 +02:00 committed by GitHub
commit 394bdf9e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,17 +1,18 @@
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,
@ -19,7 +20,7 @@ index a44941a1e73..5fc924cb367 100644
...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(

View File

@ -34950,6 +34950,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;
};