code-server: 4.8.3 -> 4.12.0

Fixes CVE-2023-26114.

Changelogs:
https://github.com/coder/code-server/blob/v4.12.0/CHANGELOG.md
This commit is contained in:
Thomas Gerbet 2023-04-26 20:06:38 +02:00
parent ddff8bd118
commit 9a7178f766
2 changed files with 4 additions and 27 deletions

View file

@ -34,14 +34,14 @@ let
in stdenv.mkDerivation rec {
pname = "code-server";
version = "4.8.3";
version = "4.12.0";
src = fetchFromGitHub {
owner = "coder";
repo = "code-server";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "1h5ng60wf3gpsydfkv20x30xsw1f5zcvv77l1mzrqz1mhcw93lvz";
hash = "sha256-PQp5dji2Ynp+LJRWBka41umwe1/IR76C+at/wyOWGcI=";
};
cloudAgent = buildGoModule rec {
@ -88,7 +88,7 @@ in stdenv.mkDerivation rec {
outputHashAlgo = "sha256";
# to get hash values use nix-build -A code-server.prefetchYarnCache
outputHash = "0jzzbmmgv1nfq975mi9ii9l6c4f1wy10fyy117xgm4s6vxana7qn";
outputHash = "sha256-4Vr9u3+W/IhbbTc39jyDyDNQODlmdF+M/N8oJn0Z4+w=";
};
nativeBuildInputs = [
@ -101,8 +101,6 @@ in stdenv.mkDerivation rec {
];
patches = [
# remove download of coder-cloud agent
./remove-cloud-agent-download.patch
# remove git calls from vscode build script
./build-vscode-nogit.patch
];
@ -129,10 +127,6 @@ in stdenv.mkDerivation rec {
# set offline mirror to yarn cache we created in previous steps
yarn --offline config set yarn-offline-mirror "${yarnCache}"
# link coder-cloud agent from nix store
mkdir -p lib
ln -s "${cloudAgent}/bin/cloud-agent" ./lib/coder-cloud-agent
# skip unnecessary electron download
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
@ -221,7 +215,7 @@ in stdenv.mkDerivation rec {
yarn build
# build vscode
yarn build:vscode
VERSION=${version} yarn build:vscode
# create release
yarn release

View file

@ -1,17 +0,0 @@
--- ./ci/build/npm-postinstall.sh
+++ ./ci/build/npm-postinstall.sh
@@ -102,14 +102,6 @@
;;
esac
- mkdir -p ./lib
-
- if curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then
- chmod +x ./lib/coder-cloud-agent
- else
- echo "Failed to download cloud agent; --link will not work"
- fi
-
if ! vscode_install; then
echo "You may not have the required dependencies to build the native modules."
echo "Please see https://github.com/coder/code-server/blob/main/docs/npm.md"