diff --git a/pkgs/servers/code-server/build-vscode-nogit.patch b/pkgs/servers/code-server/build-vscode-nogit.patch index ec726c68d438..335349e4651a 100644 --- a/pkgs/servers/code-server/build-vscode-nogit.patch +++ b/pkgs/servers/code-server/build-vscode-nogit.patch @@ -1,8 +1,15 @@ diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh -index a72549fb..3aed1ad5 100755 +index a72549fb..b1b6074b 100755 --- a/ci/build/build-vscode.sh +++ b/ci/build/build-vscode.sh -@@ -58,7 +58,6 @@ main() { +@@ -52,13 +52,12 @@ main() { + # since Code tries to get the commit from the `.git` directory which will fail + # as it is a submodule. + export BUILD_SOURCEVERSION +- BUILD_SOURCEVERSION=$(git rev-parse HEAD) ++ BUILD_SOURCEVERSION=none + + # Add the date, our name, links, and enable telemetry (this just makes # telemetry available; telemetry can still be disabled by flag or setting). # This needs to be done before building as Code will read this file and embed # it into the client-side code. @@ -10,11 +17,21 @@ index a72549fb..3aed1ad5 100755 cp product.json product.original.json # Since jq has no inline edit. jq --slurp '.[0] * .[1]' product.original.json <( cat << EOF -@@ -105,7 +104,6 @@ EOF +@@ -105,17 +104,12 @@ EOF # Reset so if you develop after building you will not be stuck with the wrong # commit (the dev client will use `oss-dev` but the dev server will still use # product.json which will have `stable-$commit`). - git checkout product.json - + popd - + + pushd lib/vscode-reh-web-linux-x64 + # Make sure Code took the version we set in the environment variable. Not + # having a version will break display languages. +- if ! jq -e .commit product.json; then +- echo "'commit' is missing from product.json" +- exit 1 +- fi + popd + + # These provide a `code-server` command in the integrated terminal to open \ No newline at end of file diff --git a/pkgs/servers/code-server/default.nix b/pkgs/servers/code-server/default.nix index 1dca87d86439..e7890f8802f0 100644 --- a/pkgs/servers/code-server/default.nix +++ b/pkgs/servers/code-server/default.nix @@ -54,19 +54,17 @@ let sed -i 's/${version}/${esbuild'.version}/g' ${path}/node_modules/esbuild/lib/main.js ln -s -f ${esbuild'}/bin/esbuild ${path}/node_modules/esbuild/bin/esbuild ''; - - commit = "2798322b03e7f446f59c5142215c11711ed7a427"; in stdenv.mkDerivation (finalAttrs: { pname = "code-server"; - version = "4.14.0"; + version = "4.14.1"; src = fetchFromGitHub { owner = "coder"; repo = "code-server"; rev = "v${finalAttrs.version}"; fetchSubmodules = true; - hash = "sha256-MJ/FCYAdWNG0joTAdvIWYqAplOoRiDRWvE9bM/V3QHo="; + hash = "sha256-j7pFh731C8HUGT+M/JvnJoDZoPH9AdfA9TxxSx1vuBM="; }; yarnCache = stdenv.mkDerivation { @@ -131,12 +129,6 @@ stdenv.mkDerivation (finalAttrs: { export HOME=$PWD patchShebangs ./ci - - # inject git commit - substituteInPlace ./ci/build/build-vscode.sh \ - --replace '$(git rev-parse HEAD)' "${commit}" - substituteInPlace ./ci/build/build-release.sh \ - --replace '$(git rev-parse HEAD)' "${commit}" ''; configurePhase = ''