Files
millerson-overlay.nix/packages/agnix/package.nix
T
alex 9c39cff0b0
CI / check (push) Has been cancelled
feat(agnix): add agnix 0.60.3 built from source
Add the agnix agent-config linter to the overlay. Built with
rustPlatform.buildRustPackage from the v0.60.3 source tarball
(cargoBuildFlags -p agnix-cli), so no upstream pre-built release
binaries are fetched. Closes nix-overlay-wfv.
2026-11-03 15:14:49 +03:00

50 lines
1.2 KiB
Nix

{
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=";
# The workspace also holds agnix-lsp, agnix-mcp and a wasm crate. Upstream
# ships the CLI alone as `agnix` (npm, pip, brew), so that is what we build;
# the wasm crate only compiles for wasm targets anyway.
cargoBuildFlags = [
"-p"
"agnix-cli"
"--bins"
];
passthru.category = "AI Coding Agents";
passthru.updateScript = [
"nix-update"
"--flake"
".#agnix"
];
meta = with lib; {
description = "Linter for AI agent configuration files: CLAUDE.md, AGENTS.md, SKILL.md, hooks and MCP configs";
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;
};
}