Skip to content

Commit eb9bfb5

Browse files
committed
chore: make python3 available in claude-code automatically
1 parent d596270 commit eb9bfb5

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎dotfiles/agents.nix‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,19 @@ in
2323
programs = {
2424
claude-code = {
2525
enable = true;
26-
package = agents.claude-code;
26+
# Claude Code shells out to python3 for edits and data munging, and
27+
# falls back to slower paths when it is missing. Suffixed so a
28+
# project-local python (devenv/.envrc) still wins. `version` is kept
29+
# so the module's version-gated features keep working.
30+
package = pkgs.symlinkJoin {
31+
inherit (agents.claude-code) pname version meta;
32+
name = "claude-code-${agents.claude-code.version}";
33+
paths = [agents.claude-code];
34+
nativeBuildInputs = [pkgs.makeWrapper];
35+
postBuild = ''
36+
wrapProgram $out/bin/claude --suffix PATH : ${lib.makeBinPath [pkgs.python3]}
37+
'';
38+
};
2739
# Same servers as the official `rust-analyzer-lsp` and `gopls-lsp`
2840
# marketplace plugins, shipped as a Home Manager-managed plugin instead.
2941
# Commands resolve through PATH on purpose: the global binaries come

0 commit comments

Comments
 (0)