Skip to content

Commit 3513095

Browse files
committed
feat: add nix dev shell
1 parent e439584 commit 3513095

File tree

3 files changed

+130
-0
lines changed

3 files changed

+130
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ integrationtests/workspaces/clangd/.cache
1717
CLAUDE.md*
1818
.mcp.json
1919
.goosehints
20+
21+
/result

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
description = "MCP Language Server - A Model Context Protocol server that runs and exposes a language server to LLMs";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = { self, nixpkgs, flake-utils }:
10+
flake-utils.lib.eachDefaultSystem (system:
11+
let
12+
pkgs = nixpkgs.legacyPackages.${system};
13+
in
14+
{
15+
packages.default = pkgs.buildGoModule rec {
16+
pname = "mcp-language-server";
17+
version = "0.1.0";
18+
19+
src = ./.;
20+
21+
vendorHash = "sha256-WcYKtM8r9xALx68VvgRabMPq8XnubhTj6NAdtmaPa+g=";
22+
23+
# Only build the main package
24+
subPackages = [ "." ];
25+
26+
ldflags = [
27+
"-s"
28+
"-w"
29+
"-X main.version=${version}"
30+
];
31+
32+
meta = with pkgs.lib; {
33+
description = "MCP server that runs and exposes a language server to LLMs";
34+
homepage = "https://github.com/isaacphi/mcp-language-server";
35+
license = licenses.bsd3;
36+
maintainers = [ ];
37+
platforms = platforms.unix;
38+
};
39+
40+
# Skip tests for now as they require external language servers
41+
doCheck = false;
42+
};
43+
44+
apps.default = {
45+
type = "app";
46+
program = "${self.packages.${system}.default}/bin/mcp-language-server";
47+
};
48+
49+
devShells.default = pkgs.mkShell {
50+
buildInputs = with pkgs; [
51+
go
52+
gopls
53+
golangci-lint
54+
delve
55+
just
56+
];
57+
58+
shellHook = ''
59+
echo "MCP Language Server development shell"
60+
echo "Available commands:"
61+
echo " go build - Build the binary"
62+
echo " go test - Run tests"
63+
echo " just -l - List available just recipes"
64+
'';
65+
};
66+
});
67+
}

0 commit comments

Comments
 (0)