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.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user