From 5b46bf8e2ceecb446b4953d08dcdc114a53ab334 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Tue, 24 Mar 2026 21:05:20 +0900 Subject: [PATCH] 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. --- pkgs/by-name/ba/basedpyright/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/ba/basedpyright/package.nix b/pkgs/by-name/ba/basedpyright/package.nix index 7502f4660df7..9250dea179f6 100644 --- a/pkgs/by-name/ba/basedpyright/package.nix +++ b/pkgs/by-name/ba/basedpyright/package.nix @@ -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 ];