Merge pull request #237986 from code-asher/code-server/bump-4.14.0-rc.1

code-server: 4.12.0 -> 4.13.0

authored by Pol Dellaiera and committed by GitHub 9ae13f2e 921865eb

+38 -21
+9
maintainers/maintainer-list.nix
··· 3098 3098 githubId = 34317; 3099 3099 name = "Corey O'Connor"; 3100 3100 }; 3101 + code-asher = { 3102 + email = "ash@coder.com"; 3103 + github = "code-asher"; 3104 + githubId = 45609798; 3105 + name = "Asher"; 3106 + keys = [{ 3107 + fingerprint = "6E3A FA6D 915C C2A4 D26F C53E 7BB4 BA9C 783D 2BBC"; 3108 + }]; 3109 + }; 3101 3110 CodeLongAndProsper90 = { 3102 3111 github = "CodeLongAndProsper90"; 3103 3112 githubId = 50145141;
+6 -12
pkgs/servers/code-server/build-vscode-nogit.patch
··· 1 - --- ./ci/build/build-vscode.sh 2 - +++ ./ci/build/build-vscode.sh 3 - @@ -45,14 +45,12 @@ 4 - # Set the commit Code will embed into the product.json. We need to do this 5 - # since Code tries to get the commit from the `.git` directory which will fail 6 - # as it is a submodule. 7 - - export VSCODE_DISTRO_COMMIT 8 - - VSCODE_DISTRO_COMMIT=$(git rev-parse HEAD) 9 - + export VSCODE_DISTRO_COMMIT=none 10 - 11 - # Add the date, our name, links, and enable telemetry (this just makes 1 + diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh 2 + index a72549fb..3aed1ad5 100755 3 + --- a/ci/build/build-vscode.sh 4 + +++ b/ci/build/build-vscode.sh 5 + @@ -58,7 +58,6 @@ main() { 12 6 # telemetry available; telemetry can still be disabled by flag or setting). 13 7 # This needs to be done before building as Code will read this file and embed 14 8 # it into the client-side code. ··· 16 10 cp product.json product.original.json # Since jq has no inline edit. 17 11 jq --slurp '.[0] * .[1]' product.original.json <( 18 12 cat << EOF 19 - @@ -99,7 +97,6 @@ 13 + @@ -105,7 +104,6 @@ EOF 20 14 # Reset so if you develop after building you will not be stuck with the wrong 21 15 # commit (the dev client will use `oss-dev` but the dev server will still use 22 16 # product.json which will have `stable-$commit`).
+23 -9
pkgs/servers/code-server/default.nix
··· 54 54 sed -i 's/${version}/${esbuild'.version}/g' ${path}/node_modules/esbuild/lib/main.js 55 55 ln -s -f ${esbuild'}/bin/esbuild ${path}/node_modules/esbuild/bin/esbuild 56 56 ''; 57 + 58 + commit = "2798322b03e7f446f59c5142215c11711ed7a427"; 57 59 in 58 60 stdenv.mkDerivation (finalAttrs: { 59 61 pname = "code-server"; 60 - version = "4.12.0"; 62 + version = "4.13.0"; 61 63 62 64 src = fetchFromGitHub { 63 65 owner = "coder"; 64 66 repo = "code-server"; 65 67 rev = "v${finalAttrs.version}"; 66 68 fetchSubmodules = true; 67 - hash = "sha256-PQp5dji2Ynp+LJRWBka41umwe1/IR76C+at/wyOWGcI="; 69 + hash = "sha256-4hkKGQU9G3CllD+teWXnYoHaY3YdDz25fwaMUS5OlfM="; 68 70 }; 69 71 70 72 yarnCache = stdenv.mkDerivation { ··· 92 94 93 95 outputHashMode = "recursive"; 94 96 outputHashAlgo = "sha256"; 95 - outputHash = "sha256-4Vr9u3+W/IhbbTc39jyDyDNQODlmdF+M/N8oJn0Z4+w="; 97 + outputHash = "sha256-xLcrOVhKC0cOPcS5XwIMyv1KiEE0azZ1z+wS9PPKjAQ="; 96 98 }; 97 99 98 100 nativeBuildInputs = [ ··· 120 122 ]; 121 123 122 124 patches = [ 123 - # remove git calls from vscode build script 125 + # Remove all git calls from the VS Code build script except `git rev-parse 126 + # HEAD` which is replaced in postPatch with the commit. 124 127 ./build-vscode-nogit.patch 125 128 ]; 126 129 ··· 130 133 patchShebangs ./ci 131 134 132 135 # inject git commit 133 - substituteInPlace ci/build/build-release.sh \ 134 - --replace '$(git rev-parse HEAD)' "$commit" 136 + substituteInPlace ./ci/build/build-vscode.sh \ 137 + --replace '$(git rev-parse HEAD)' "${commit}" 138 + substituteInPlace ./ci/build/build-release.sh \ 139 + --replace '$(git rev-parse HEAD)' "${commit}" 135 140 ''; 136 141 137 142 configurePhase = '' ··· 232 237 -execdir ln -s ${ripgrep}/bin/rg {}/bin/rg \; 233 238 234 239 # run postinstall scripts after patching 235 - find ./lib/vscode -path "*node_modules" -prune -o \ 236 - -path "./*/*/*/*/*" -name "yarn.lock" -printf "%h\n" | \ 240 + find ./lib/vscode \( -path "*/node_modules/*" -or -path "*/extensions/*" \) \ 241 + -and -type f -name "yarn.lock" -printf "%h\n" | \ 237 242 xargs -I {} sh -c 'jq -e ".scripts.postinstall" {}/package.json >/dev/null && yarn --cwd {} postinstall --frozen-lockfile --offline || true' 238 243 239 244 # build code-server ··· 241 246 242 247 # build vscode 243 248 VERSION=${finalAttrs.version} yarn build:vscode 249 + 250 + # inject version into package.json 251 + jq --slurp '.[0] * .[1]' ./package.json <( 252 + cat << EOF 253 + { 254 + "version": "${finalAttrs.version}" 255 + } 256 + EOF 257 + ) | sponge ./package.json 244 258 245 259 # create release 246 260 yarn release ··· 283 297 ''; 284 298 homepage = "https://github.com/coder/code-server"; 285 299 license = lib.licenses.mit; 286 - maintainers = with lib.maintainers; [ offline henkery ]; 300 + maintainers = with lib.maintainers; [ offline henkery code-asher ]; 287 301 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; 288 302 }; 289 303 })