tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
openvscode-server: switch to nodejs 18
Pol Dellaiera
2 years ago
2fffc430
4a22f6f0
+12
-14
3 changed files
expand all
collapse all
unified
split
pkgs
servers
openvscode-server
default.nix
remove-node-download.patch
top-level
all-packages.nix
+2
-6
pkgs/servers/openvscode-server/default.nix
···
1
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
2
, cacert, moreutils, jq, git, pkg-config, yarn, python3
3
-
, esbuild, nodejs_16, libsecret, xorg, ripgrep
4
, AppKit, Cocoa, Security, cctools, nixosTests }:
5
6
let
7
system = stdenv.hostPlatform.system;
8
9
-
nodejs = nodejs_16;
10
yarn' = yarn.override { inherit nodejs; };
11
defaultYarnOpts = [ "frozen-lockfile" "non-interactive" "no-progress"];
12
···
108
109
# set offline mirror to yarn cache we created in previous steps
110
yarn --offline config set yarn-offline-mirror "${yarnCache}"
111
-
112
-
# set nodedir, so we can build binaries later
113
-
npm config set nodedir "${nodejs}"
114
'';
115
116
buildPhase = ''
···
147
# rebuild binaries, we use npm here, as yarn does not provide an alternative
148
# that would not attempt to try to reinstall everything and break our
149
# patching attempts
150
-
npm --prefix ./remote rebuild --build-from-source
151
152
# run postinstall scripts after patching
153
find . -path "*node_modules" -prune -o \
···
1
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
2
, cacert, moreutils, jq, git, pkg-config, yarn, python3
3
+
, esbuild, nodejs, libsecret, xorg, ripgrep
4
, AppKit, Cocoa, Security, cctools, nixosTests }:
5
6
let
7
system = stdenv.hostPlatform.system;
8
0
9
yarn' = yarn.override { inherit nodejs; };
10
defaultYarnOpts = [ "frozen-lockfile" "non-interactive" "no-progress"];
11
···
107
108
# set offline mirror to yarn cache we created in previous steps
109
yarn --offline config set yarn-offline-mirror "${yarnCache}"
0
0
0
110
'';
111
112
buildPhase = ''
···
143
# rebuild binaries, we use npm here, as yarn does not provide an alternative
144
# that would not attempt to try to reinstall everything and break our
145
# patching attempts
146
+
npm --prefix ./remote rebuild --build-from-source --nodedir ${nodejs}
147
148
# run postinstall scripts after patching
149
find . -path "*node_modules" -prune -o \
+9
-8
pkgs/servers/openvscode-server/remove-node-download.patch
···
1
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
2
-
index a44941a1e73..5fc924cb367 100644
3
--- a/build/gulpfile.reh.js
4
+++ b/build/gulpfile.reh.js
5
-
@@ -265,8 +265,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
6
.pipe(util.stripSourceMappingURL())
7
.pipe(jsFilter.restore);
8
-
9
- const nodePath = `.build/node/v${nodeVersion}/${platform}-${arch}`;
10
- const node = gulp.src(`${nodePath}/**`, { base: nodePath, dot: true });
11
-
12
let web = [];
13
if (type === 'reh-web') {
14
-
@@ -284,7 +282,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
0
15
license,
16
sources,
17
deps,
18
- node,
19
...web
20
);
21
-
22
-
@@ -382,7 +379,6 @@ function tweakProductForServerWeb(product) {
23
const destinationFolderName = `vscode-${type}${dashed(platform)}${dashed(arch)}`;
24
-
25
const serverTaskCI = task.define(`vscode-${type}${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series(
26
- gulp.task(`node-${platform}-${arch}`),
27
util.rimraf(path.join(BUILD_ROOT, destinationFolderName)),
···
1
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
2
+
index 4630eaad3cc..96b165b0949 100644
3
--- a/build/gulpfile.reh.js
4
+++ b/build/gulpfile.reh.js
5
+
@@ -271,9 +271,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
6
.pipe(util.stripSourceMappingURL())
7
.pipe(jsFilter.restore);
8
+
9
- const nodePath = `.build/node/v${nodeVersion}/${platform}-${arch}`;
10
- const node = gulp.src(`${nodePath}/**`, { base: nodePath, dot: true });
11
+
-
12
let web = [];
13
if (type === 'reh-web') {
14
+
web = [
15
+
@@ -290,7 +287,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
16
license,
17
sources,
18
deps,
19
- node,
20
...web
21
);
22
+
23
+
@@ -408,7 +404,6 @@ function tweakProductForServerWeb(product) {
24
const destinationFolderName = `vscode-${type}${dashed(platform)}${dashed(arch)}`;
25
+
26
const serverTaskCI = task.define(`vscode-${type}${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series(
27
- gulp.task(`node-${platform}-${arch}`),
28
util.rimraf(path.join(BUILD_ROOT, destinationFolderName)),
+1
pkgs/top-level/all-packages.nix
···
34952
vscodium-fhsWithPackages = vscodium.fhsWithPackages;
34953
34954
openvscode-server = callPackage ../servers/openvscode-server {
0
34955
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;
34956
inherit (darwin) cctools;
34957
};
···
34952
vscodium-fhsWithPackages = vscodium.fhsWithPackages;
34953
34954
openvscode-server = callPackage ../servers/openvscode-server {
34955
+
nodejs = nodejs_18;
34956
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;
34957
inherit (darwin) cctools;
34958
};