Implements a new MCP server that provides read-only access to git repositories using go-git. Designed for deployment verification by comparing deployed flake revisions against source repositories. 9 tools: resolve_ref, get_log, get_commit_info, get_diff_files, get_file_at_commit, is_ancestor, commits_between, list_branches, search_commits. Includes CLI commands, NixOS module, and comprehensive tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
30 lines
702 B
Nix
30 lines
702 B
Nix
{ lib, buildGoModule, makeWrapper, nix, src
|
|
, pname ? "nixos-options-mcp"
|
|
, subPackage ? "cmd/nixos-options"
|
|
, mainProgram ? "nixos-options"
|
|
, description ? "MCP server for NixOS options search and query"
|
|
}:
|
|
|
|
buildGoModule {
|
|
inherit pname src;
|
|
version = "0.3.0";
|
|
|
|
vendorHash = "sha256-XrTtiaQT5br+0ZXz8//rc04GZn/HlQk7l8Nx/+Uil/I=";
|
|
|
|
subPackages = [ subPackage ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/${mainProgram} \
|
|
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
inherit description mainProgram;
|
|
homepage = "https://git.t-juice.club/torjus/labmcp";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|