summary refs log tree commit diff
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-06-27 20:45:38 +0200
committerGitHub <noreply@github.com>2023-06-27 20:45:38 +0200
commit2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a (patch)
treef69b90b990dd4b3323bb2f25977824e96ecc3495
parente30b53b990354deb1a18f186dc5130c1525ef718 (diff)
downloadnixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.tar
nixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.tar.gz
nixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.tar.bz2
nixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.tar.lz
nixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.tar.xz
nixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.tar.zst
nixpkgs-2ef15a4ef3fa5fdc2e78bc4f2f6eb8fc010b288a.zip
code-server: 4.14.0 -> 4.14.1 (#240001)
-rw-r--r--pkgs/servers/code-server/build-vscode-nogit.patch27
-rw-r--r--pkgs/servers/code-server/default.nix12
2 files changed, 24 insertions, 15 deletions
diff --git a/pkgs/servers/code-server/build-vscode-nogit.patch b/pkgs/servers/code-server/build-vscode-nogit.patch
index ec726c68d43..335349e4651 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 1dca87d8643..e7890f8802f 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 = ''