basedpyright: remove references to nodejs source

The keytar native module's build artifacts contain hardcoded paths to
nodejs-slim and nodejs-source, pulling them into the runtime closure.
Remove these build artifacts to reduce closure size.

AI disclosure: This PR was created with assistance of opencode. Changes
were reviewed and built/tested locally.
This commit is contained in:
Shogo Takata
2026-03-24 21:05:20 +09:00
parent 3acac9c1a1
commit 5b46bf8e2c

View File

@@ -49,6 +49,8 @@ buildNpmPackage rec {
mv "$out/bin/pyright-langserver" "$out/bin/basedpyright-langserver"
# Remove dangling symlinks created during installation (remove -delete to just see the files, or -print '%l\n' to see the target
find -L $out -type l -print -delete
# Remove native module build artifacts that reference nodejs source
rm -rf "$out/lib/node_modules/pyright-root/node_modules/keytar/build"
'';
nativeInstallCheckInputs = [ versionCheckHook ];