From 0c2094806c9e542f31785ef3569ab9e900e3ce9c Mon Sep 17 00:00:00 2001 From: eztakesin Date: Mon, 20 Jul 2026 23:11:14 +0700 Subject: [PATCH] vscode: fix darwin ripgrep path for VS Code >= 1.129 VS Code 1.129 moved node_modules back into app.asar on darwin, shipping native binaries in node_modules.asar.unpacked/ like before 1.94. The chmod of the bundled ripgrep still targeted the old node_modules/ path, so vscode failed to build on darwin: chmod: cannot access 'Contents/Resources/app/node_modules/@vscode/ripgrep-universal/bin/darwin-arm64/rg' Checked against the official darwin-arm64 zips: 1.128.0 and 1.128.1 ship node_modules/, while 1.129.0 and 1.129.1 ship node_modules.asar.unpacked/. Assisted-by: Claude Code (Claude Fable 5) --- pkgs/applications/editors/vscode/generic.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 7c365bee3791..31e906008227 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -419,7 +419,11 @@ stdenv.mkDerivation ( let nodeModulesPath = if stdenv.hostPlatform.isDarwin then - if lib.versionAtLeast vscodeVersion "1.94.0" then + # 1.129 moved node_modules back into app.asar, shipping native + # binaries in the asar.unpacked directory like before 1.94 + if lib.versionAtLeast vscodeVersion "1.129.0" then + "Contents/Resources/app/node_modules.asar.unpacked" + else if lib.versionAtLeast vscodeVersion "1.94.0" then "Contents/Resources/app/node_modules" else "Contents/Resources/app/node_modules.asar.unpacked"