diff --git a/pkgs/servers/openvscode-server/default.nix b/pkgs/servers/openvscode-server/default.nix index f5c17fcaff64..046a68f9d030 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 c53b79de019e..f8df53770acc 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)), diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e47611ae21ec..8c589ea4ce86 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };