1 Commits

Author SHA1 Message Date
Vidhan Bhatt
cc51f24b9b claude-code: allow hooks to accept a path like skills/commands
programs.claude-code.hooks previously only accepted inline strings.
It now shares the same either-lines-or-path content option used by
agents, commands, and rules, so a hook script can be referenced from
a file instead of being inlined.

mkSourceEntry used lib.isPath, which does not match derivations such
as pkgs.writeShellScript. Since lib.types.path accepts derivations,
a derivation-backed hook (or agent, command, rule, or output style)
sent the derivation to home.file.*.text and failed evaluation. Use
lib.hm.strings.isPathLike instead, and add a derivation-backed hook
test.

No release-notes entry: other option additions/extensions to this
module (e.g. path support for agents/commands, the rules option
itself) haven't warranted one either.
2026-08-05 14:33:00 -05:00