Skip to content

Instantly share code, notes, and snippets.

@oreo639
Created January 30, 2025 23:30
Show Gist options
  • Save oreo639/a2b2bb660cbaac71d30e65709de7d4c3 to your computer and use it in GitHub Desktop.
Save oreo639/a2b2bb660cbaac71d30e65709de7d4c3 to your computer and use it in GitHub Desktop.
diff --git a/srcpkgs/vscode/template b/srcpkgs/vscode/template
index 4e893a68438..3541cef770d 100644
--- a/srcpkgs/vscode/template
+++ b/srcpkgs/vscode/template
@@ -1,6 +1,6 @@
# Template file for 'vscode'
pkgname=vscode
-version=1.96.0
+version=1.96.4
revision=1
_electronver=33.0.2
_npmver=10.8.3
@@ -12,7 +12,7 @@ maintainer="shizonic <realtiaz@gmail.com>, Alex Lohr <alexthkloss@web.de>"
license="MIT"
homepage="https://code.visualstudio.com/"
distfiles="https://github.com/microsoft/vscode/archive/refs/tags/${version}.tar.gz"
-checksum=89b456b01b24a3e865f7568108029a1cfd0672d2a456db66e4b47eb401e4f46e
+checksum=cbd16ab3cfe5322a532899f7c7ef4a203512c70f464c405465e6aa8b85a4c22b
nocross=yes # x64 build does not cut it, it contains native code
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
@@ -52,29 +52,11 @@ do_build() {
# npm install because it doesn't inherit properly
echo "ignore-engines=true" >> .npmrc
- # @vscode/ripgrep attempts to install an own version of ripgrep and provides a path
- # we want to use our own version instead, so all we need is the fixed path (/bin/rg)
- mkdir local-ripgrep
- echo "export const rgPath = '/bin/rg';" >> local-ripgrep/index.mjs
- echo "export declare const rgPath: string;" >> local-ripgrep/index.d.ts
- echo "{\"name\":\"@vscode/ripgrep\",\"version\":\"1.15.9\",\"main\":\"index.mjs\",\"scripts\":{\"test\":\"echo \\"Error: no test specified\\" && exit 1\"},\"author\":\"\",\"license\":\"MIT\",\"description\":\"\"}" >> local-ripgrep/package.json
- npm install --save @vscode/ripgrep@./local-ripgrep
- (cd remote; npm install --save @vscode/ripgrep@../local-ripgrep)
-
- # add missing dependencies that were left over in the pre-release version of TS used here
- #npm install --save-dev @bazel/bazelisk@1.22.0 @bazel/concatjs@5.8.1 karma-chrome-launcher@3.2.0 karma-firefox-launcher@2.1.3 karma-jasmine@5.1.0 karma-junit-reporter@2.0.1 karma-requirejs@1.1.0 karma-sourcemap-loader@0.4.0 karma@6.4.4 requirejs@2.3.7
-
- # update a broken ts dependency to one that is supposed to work
- #npm install --save-dev typescript@5.7.0-beta
-
npm ci
# do not checksum electron, since we're using our own build
vsed -e "s/validateChecksum: true/validateChecksum: false/g" -i build/lib/electron.*s
- # npm ls --all throws ELSPROBLEMS, but we can make do w/o --all
- vsed -e "s/npm ls --all/npm ls/g" -i build/lib/dependencies.*s
-
export CFLAGS="$CFLAGS -I/usr/include/node"
npm run gulp vscode-linux-x64-min
}
@@ -83,6 +65,10 @@ do_install() {
vmkdir usr/lib/code-oss
vcopy ../VSCode-linux-x64/resources usr/lib/code-oss
vcopy ../VSCode-linux-x64/bin usr/lib/code-oss
+
+ # Replace statically included binary with system copy
+ ln -sf /usr/bin/rg ${DESTDIR}/usr/lib/code-oss/resources/app/node_modules/@vscode/ripgrep/bin/rg
+
vmkdir usr/bin
ln -sf /usr/lib/code-oss/bin/code-oss ${DESTDIR}/usr/bin/
vmkdir usr/share/applications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment