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