{ lib, rustPlatform, fetchFromGitHub, }: rustPlatform.buildRustPackage rec { pname = "agnix"; version = "0.60.3"; src = fetchFromGitHub { owner = "agent-sh"; repo = "agnix"; rev = "v${version}"; hash = "sha256-XXrt9bgWLMPgsdiIp88SajpQpQ6nbSfGWu2WtHk2q8c="; }; cargoHash = "sha256-wA2xnizHT5OuKOasxMYya/eJHWD0JaGUTYZpVcsEOFc="; # One build for the three native binaries, like upstream's release job. The # wasm crate is left out: it only compiles for wasm targets. cargoBuildFlags = [ "-p" "agnix-cli" "-p" "agnix-lsp" "-p" "agnix-mcp" "--bins" ]; passthru.category = "AI Coding Agents"; passthru.updateScript = [ "nix-update" "--flake" ".#agnix" ]; meta = with lib; { description = "Linter for AI agent config files (CLAUDE.md, AGENTS.md, SKILL.md, hooks, MCP), with agnix-lsp and agnix-mcp"; homepage = "https://github.com/agent-sh/agnix"; changelog = "https://github.com/agent-sh/agnix/blob/v${version}/CHANGELOG.md"; license = with licenses; [ mit asl20 ]; sourceProvenance = with sourceTypes; [ fromSource ]; mainProgram = "agnix"; platforms = platforms.all; }; }