1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 versionCheckHook,
6 nix-update-script,
7}:
8
9buildGoModule (finalAttrs: {
10 pname = "github-mcp-server";
11 version = "0.15.0";
12
13 src = fetchFromGitHub {
14 owner = "github";
15 repo = "github-mcp-server";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-D6oEnaHrGnFfuO6NXRYbJ665OlWcwHo+JLfCPrdDkE4=";
18 };
19
20 vendorHash = "sha256-0QqgyjK3QID72aMI6l6ofXAUt94PYFqO8dWech7yaFw=";
21
22 ldflags = [
23 "-s"
24 "-w"
25 "-X=main.version=${finalAttrs.version}"
26 "-X=main.commit=${finalAttrs.src.rev}"
27 "-X=main.date=1970-01-01T00:00:00Z"
28 ];
29
30 __darwinAllowLocalNetworking = true;
31
32 doInstallCheck = true;
33 nativeInstallCheckInputs = [ versionCheckHook ];
34 versionCheckProgramArg = "--version";
35
36 passthru.updateScript = nix-update-script { };
37
38 meta = {
39 changelog = "https://github.com/github/github-mcp-server/releases/tag/v${finalAttrs.version}";
40 description = "GitHub's official MCP Server";
41 homepage = "https://github.com/github/github-mcp-server";
42 license = lib.licenses.mit;
43 mainProgram = "github-mcp-server";
44 maintainers = with lib.maintainers; [ ];
45 };
46})