This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools/claude: use custom wrapper instead of preHook

Switches from preHook to custom wrapper to properly configure MCP servers
using the claude binary path before execution

+20 -15
+20 -15
tools/claude/flake-module.nix
··· 12 12 in 13 13 { 14 14 packages.claude = self.libWithPkgs.${system}.makeWrapper (self.lib.halalify pkgs.claude-code) { 15 - preHook = '' 16 - # Configure MCP servers using Claude CLI 17 - if claude mcp add git-mcp "${gitMcpPath}" 2>/dev/null && \ 18 - claude mcp add tmux-mcp "${tmuxMcpPath}" 2>/dev/null; then 19 - echo "MCP servers configured successfully" >&2 20 - else 21 - echo "Warning: Could not configure MCP servers" >&2 22 - fi 15 + wrapper = 16 + { exePath, ... }: 17 + '' 18 + set -efu 19 + set -x 20 + # Configure MCP servers using Claude CLI 21 + if ${exePath} mcp add git-mcp "${gitMcpPath}" 2>/dev/null && \ 22 + ${exePath} mcp add tmux-mcp "${tmuxMcpPath}" 2>/dev/null; then 23 + echo "MCP servers configured successfully" >&2 24 + else 25 + echo "Warning: Could not configure MCP servers" >&2 26 + fi 23 27 24 - # Set up CLAUDE.md if it doesn't exist 25 - CLAUDE_MD_DIR="''${CLAUDE_MD_DIR:-$HOME/.claude}" 26 - mkdir -p "$CLAUDE_MD_DIR" 27 - if [[ ! -f "$CLAUDE_MD_DIR/CLAUDE.md" ]]; then 28 - cp ${claudeMd} "$CLAUDE_MD_DIR/CLAUDE.md" 29 - fi 30 - ''; 28 + # Set up CLAUDE.md if it doesn't exist 29 + CLAUDE_MD_DIR="''${CLAUDE_MD_DIR:-$HOME/.claude}" 30 + mkdir -p "$CLAUDE_MD_DIR" 31 + if [[ ! -f "$CLAUDE_MD_DIR/CLAUDE.md" ]]; then 32 + cp ${claudeMd} "$CLAUDE_MD_DIR/CLAUDE.md" 33 + fi 34 + exec ${exePath} "$@" 35 + ''; 31 36 }; 32 37 }; 33 38 }