···11{ lib
22+, fetchurl
23, stdenvNoCC
33-, fetchFromGitHub
44}:
5566stdenvNoCC.mkDerivation rec {
77 pname = "sof-firmware";
88- version = "2.2.2";
88+ version = "2.2.3";
991010- src = fetchFromGitHub {
1111- owner = "thesofproject";
1212- repo = "sof-bin";
1313- rev = "v${version}";
1414- sha256 = "sha256-ztewE/8Mc0bbKbxmbJ2sBn3TysuM9hoaSgqrboy77oI=";
1010+ src = fetchurl {
1111+ url = "https://github.com/thesofproject/sof-bin/releases/download/v${version}/sof-bin-v${version}.tar.gz";
1212+ sha256 = "sha256-WR/9ZvHisycDjJHt88hQK0FywdyFDP5EBQ6t+OT620I=";
1513 };
16141715 dontFixup = true; # binaries must not be stripped or patchelfed
18161919- # There is no proper structure in the upstream repo.
2020- # This needs to be adapted by hand for every new release.
2117 installPhase = ''
2218 runHook preInstall
2323- cd "v2.2.x"
2424- mkdir -p $out/lib/firmware/intel/sof{,-tplg}
2525- cp -a sof-v2.2/* $out/lib/firmware/intel/sof
2626- cp -a sof-v2.2.2/* $out/lib/firmware/intel/sof
2727- cp -a sof-tplg-v2.2.1/* $out/lib/firmware/intel/sof-tplg
1919+ mkdir -p $out/lib/firmware/intel
2020+ cp -av sof-v${version} $out/lib/firmware/intel/sof
2121+ cp -av sof-tplg-v${version} $out/lib/firmware/intel/sof-tplg
2822 runHook postInstall
2923 '';
30243125 meta = with lib; {
2626+ changelog = "https://github.com/thesofproject/sof-bin/releases/tag/v${version}";
3227 description = "Sound Open Firmware";
3328 homepage = "https://www.sofproject.org/";
3429 license = with licenses; [ bsd3 isc ];
3530 maintainers = with maintainers; [ lblasc evenbrenden hmenke ];
3631 platforms = with platforms; linux;
3232+ sourceProvenance = with sourceTypes; [ binaryNativeCode ];
3733 };
3834}
+26
pkgs/servers/code-server/build-vscode-nogit.patch
···11+--- ./ci/build/build-vscode.sh
22++++ ./ci/build/build-vscode.sh
33+@@ -45,14 +45,12 @@
44+ # Set the commit Code will embed into the product.json. We need to do this
55+ # since Code tries to get the commit from the `.git` directory which will fail
66+ # as it is a submodule.
77+- export VSCODE_DISTRO_COMMIT
88+- VSCODE_DISTRO_COMMIT=$(git rev-parse HEAD)
99++ export VSCODE_DISTRO_COMMIT=none
1010+1111+ # Add the date, our name, links, and enable telemetry (this just makes
1212+ # telemetry available; telemetry can still be disabled by flag or setting).
1313+ # This needs to be done before building as Code will read this file and embed
1414+ # it into the client-side code.
1515+- git checkout product.json # Reset in case the script exited early.
1616+ cp product.json product.original.json # Since jq has no inline edit.
1717+ jq --slurp '.[0] * .[1]' product.original.json <(
1818+ cat << EOF
1919+@@ -99,7 +97,6 @@
2020+ # Reset so if you develop after building you will not be stuck with the wrong
2121+ # commit (the dev client will use `oss-dev` but the dev server will still use
2222+ # product.json which will have `stable-$commit`).
2323+- git checkout product.json
2424+2525+ popd
2626+
+47-52
pkgs/servers/code-server/default.nix
···11{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper, runCommand
22, cacert, moreutils, jq, git, rsync, pkg-config, yarn, python3
33-, esbuild, nodejs-14_x, node-gyp, libsecret, xorg, ripgrep
44-, AppKit, Cocoa, CoreServices, Security, cctools, xcbuild }:
33+, esbuild, nodejs-16_x, node-gyp, libsecret, xorg, ripgrep
44+, AppKit, Cocoa, CoreServices, Security, cctools, xcbuild, quilt }:
5566let
77 system = stdenv.hostPlatform.system;
8899- nodejs = nodejs-14_x;
99+ nodejs = nodejs-16_x;
1010 python = python3;
1111 yarn' = yarn.override { inherit nodejs; };
1212- defaultYarnOpts = [ "frozen-lockfile" "non-interactive" "no-progress"];
1212+ defaultYarnOpts = [ ];
13131414 # replaces esbuild's download script with a binary from nixpkgs
1515 patchEsbuild = path : version : ''
···21212222in stdenv.mkDerivation rec {
2323 pname = "code-server";
2424- version = "4.0.1";
2525- commit = "7fe23daf009e5234eaa54a1ea5ff26df384c47ac";
2424+ version = "4.8.3";
26252726 src = fetchFromGitHub {
2828- owner = "cdr";
2727+ owner = "coder";
2928 repo = "code-server";
3029 rev = "v${version}";
3131- sha256 = "1s3dcmzlkyh7qfs3ai1p7dlp45iys0ax1fbxxz17p395pw9anrrl";
3030+ fetchSubmodules = true;
3131+ sha256 = "1h5ng60wf3gpsydfkv20x30xsw1f5zcvv77l1mzrqz1mhcw93lvz";
3232 };
33333434 cloudAgent = buildGoModule rec {
3535 pname = "cloud-agent";
3636- version = "0.2.3";
3636+ version = "0.2.6";
37373838 src = fetchFromGitHub {
3939- owner = "cdr";
3939+ owner = "coder";
4040 repo = "cloud-agent";
4141 rev = "v${version}";
4242- sha256 = "14i1qq273f0yn5v52ryiqwj7izkd1yd212di4gh4bqypmmzhw3jj";
4242+ sha256 = "1s3jpgvzizc9skc27c3x35sya2p4ywhvdi3l73927z3j47wszy7f";
4343 };
44444545- vendorSha256 = "0k9v10wkzx53r5syf6bmm81gr4s5dalyaa07y9zvx6vv5r2h0661";
4545+ vendorSha256 = "14xzlbmki8fk8mbcci62q8sklyd0nyga07ww1ap0vdrv7d1g31hn";
46464747 postPatch = ''
4848 # the cloud-agent release tag has an empty version string, so add it back in
···6666 xargs -I {} yarn --cwd {} \
6767 --frozen-lockfile --ignore-scripts --ignore-platform \
6868 --ignore-engines --no-progress --non-interactive
6969+7070+ find ./lib/vscode -name "yarn.lock" -printf "%h\n" | \
7171+ xargs -I {} yarn --cwd {} \
7272+ --ignore-scripts --ignore-engines
6973 '';
7074 outputHashMode = "recursive";
7175 outputHashAlgo = "sha256";
72767377 # to get hash values use nix-build -A code-server.prefetchYarnCache
7474- outputHash = "0qmfsirld1qfl2s26rxbpmvxsyj2pvzkgk8w89zlrgbhgc5fj8p9";
7878+ outputHash = "0jzzbmmgv1nfq975mi9ii9l6c4f1wy10fyy117xgm4s6vxana7qn";
7579 };
76807781 nativeBuildInputs = [
7878- nodejs yarn' python pkg-config makeWrapper git rsync jq moreutils
8282+ nodejs yarn' python pkg-config makeWrapper git rsync jq moreutils quilt
7983 ];
8084 buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ]
8185 ++ (with xorg; [ libX11 libxkbfile ])
···8690 patches = [
8791 # remove download of coder-cloud agent
8892 ./remove-cloud-agent-download.patch
9393+ # remove git calls from vscode build script
9494+ ./build-vscode-nogit.patch
8995 ];
90969197 postPatch = ''
···133139 # install code-server dependencies
134140 yarn --offline --ignore-scripts
135141142142+ # apply patches
143143+ quilt push -a
144144+136145 # patch shebangs of everything to allow binary packages to build
137146 patchShebangs .
138147139139- # Skip shellcheck download
140140- jq "del(.scripts.preinstall)" node_modules/shellcheck/package.json | sponge node_modules/shellcheck/package.json
148148+ export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
149149+ export SKIP_SUBMODULE_DEPS=1
150150+ export NODE_OPTIONS=--openssl-legacy-provider
141151142152 # rebuild binary packages now that scripts have been patched
143143- npm rebuild
153153+ echo "----- NPM rebuild"
154154+ npm rebuild --prefer-offline
144155145156 # Replicate ci/dev/postinstall.sh
146157 echo "----- Replicate ci/dev/postinstall.sh"
147158 yarn --cwd "./vendor" install --modules-folder modules --offline --ignore-scripts --frozen-lockfile
148159149149- # Replicate vendor/postinstall.sh
150150- echo " ----- Replicate vendor/postinstall.sh"
151151- yarn --cwd "./vendor/modules/code-oss-dev" --offline --frozen-lockfile --ignore-scripts install
152152-153160 # remove all built-in extensions, as these are 3rd party extensions that
154161 # get downloaded from vscode marketplace
155155- jq --slurp '.[0] * .[1]' "vendor/modules/code-oss-dev/product.json" <(
162162+ jq --slurp '.[0] * .[1]' "./lib/vscode/product.json" <(
156163 cat << EOF
157164 {
158165 "builtInExtensions": []
159166 }
160167 EOF
161161- ) | sponge vendor/modules/code-oss-dev/product.json
168168+ ) | sponge ./lib/vscode/product.json
162169163170 # disable automatic updates
164171 sed -i '/update.mode/,/\}/{s/default:.*/default: "none",/g}' \
165165- vendor/modules/code-oss-dev/src/vs/platform/update/common/update.config.contribution.ts
166166-167167- # put ripgrep binary into bin, so postinstall does not try to download it
168168- find -name vscode-ripgrep -type d \
169169- -execdir mkdir -p {}/bin \; \
170170- -execdir ln -s ${ripgrep}/bin/rg {}/bin/rg \;
171171-172172- # Playwright is only needed for tests, we can disable it for builds.
173173- # There's an environment variable to disable downloads, but the package makes a breaking call to
174174- # sw_vers before that variable is checked.
175175- patch -p1 -i ${./playwright.patch}
172172+ lib/vscode/src/vs/platform/update/common/update.config.contribution.ts
176173177174 # Patch out remote download of nodejs from build script
178175 patch -p1 -i ${./remove-node-download.patch}
179176180180- # Replicate install vscode dependencies without running script for all vscode packages
181181- # that require patching for postinstall scripts to succeed
182182- find ./vendor/modules/code-oss-dev -path "*node_modules" -prune -o \
183183- -path "./*/*/*/*/*" -name "yarn.lock" -printf "%h\n" | \
177177+ # Fetch packages for vscode
178178+ find ./lib/vscode -name "yarn.lock" -printf "%h\n" | \
184179 xargs -I {} yarn --cwd {} \
185185- --frozen-lockfile --offline --ignore-scripts --ignore-engines
186186-180180+ --frozen-lockfile --ignore-scripts --ignore-engines
187181188182 # patch shebangs of everything to allow binary packages to build
189183 patchShebangs .
190184191191- ${patchEsbuild "./vendor/modules/code-oss-dev/build" "0.12.6"}
192192- ${patchEsbuild "./vendor/modules/code-oss-dev/extensions" "0.11.23"}
193193- '' + lib.optionalString stdenv.isDarwin ''
185185+ ${patchEsbuild "./lib/vscode/build" "0.12.6"}
186186+ ${patchEsbuild "./lib/vscode/extensions" "0.11.23"}
187187+ '' + lib.optionalString stdenv.isDarwin ''
194188 # use prebuilt binary for @parcel/watcher, which requires macOS SDK 10.13+
195189 # (see issue #101229)
196196- pushd ./vendor/modules/code-oss-dev/remote/node_modules/@parcel/watcher
190190+ pushd ./lib/vscode/remote/node_modules/@parcel/watcher
197191 mkdir -p ./build/Release
198192 mv ./prebuilds/darwin-x64/node.napi.glibc.node ./build/Release/watcher.node
199193 jq "del(.scripts) | .gypfile = false" ./package.json | sponge ./package.json
200194 popd
201195 '' + ''
202202- # rebuild binaries, we use npm here, as yarn does not provide an alternative
203203- # that would not attempt to try to reinstall everything and break our
204204- # patching attempts
205205- npm rebuild --prefix vendor/modules/code-oss-dev --update-binary
196196+197197+ # put ripgrep binary into bin, so postinstall does not try to download it
198198+ find -name ripgrep -type d \
199199+ -execdir mkdir -p {}/bin \; \
200200+ -execdir ln -s ${ripgrep}/bin/rg {}/bin/rg \;
206201207202 # run postinstall scripts after patching
208208- find ./vendor/modules/code-oss-dev -path "*node_modules" -prune -o \
203203+ find ./lib/vscode -path "*node_modules" -prune -o \
209204 -path "./*/*/*/*/*" -name "yarn.lock" -printf "%h\n" | \
210205 xargs -I {} sh -c 'jq -e ".scripts.postinstall" {}/package.json >/dev/null && yarn --cwd {} postinstall --frozen-lockfile --offline || true'
211206···233228 ln -s "${cloudAgent}/bin/cloud-agent" $out/libexec/code-server/lib/coder-cloud-agent
234229235230 # create wrapper
236236- makeWrapper "${nodejs-14_x}/bin/node" "$out/bin/code-server" \
231231+ makeWrapper "${nodejs-16_x}/bin/node" "$out/bin/code-server" \
237232 --add-flags "$out/libexec/code-server/out/node/entry.js"
238233 '';
239234···249244 code-server is VS Code running on a remote server, accessible through the
250245 browser.
251246 '';
252252- homepage = "https://github.com/cdr/code-server";
247247+ homepage = "https://github.com/coder/code-server";
253248 license = licenses.mit;
254254- maintainers = with maintainers; [ offline ];
249249+ maintainers = with maintainers; [ offline henkery ];
255250 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
256251 };
257252}
···11--- ./ci/build/npm-postinstall.sh
22+++ ./ci/build/npm-postinstall.sh
33-@@ -58,14 +58,6 @@
44-55- OS="$(uname | tr '[:upper:]' '[:lower:]')"
66-33+@@ -102,14 +102,6 @@
44+ ;;
55+ esac
66+77- mkdir -p ./lib
88-
99-- if curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then
99+- if curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then
1010- chmod +x ./lib/coder-cloud-agent
1111- else
1212- echo "Failed to download cloud agent; --link will not work"
1313- fi
1414-
1515- if ! vscode_yarn; then
1515+ if ! vscode_install; then
1616 echo "You may not have the required dependencies to build the native modules."
1717- echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"
1717+ echo "Please see https://github.com/coder/code-server/blob/main/docs/npm.md"