diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 72533be6c4e3..6039d4705364 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -22889,6 +22889,12 @@ githubId = 4196789; name = "Nathan Ringo"; }; + remix7531 = { + email = "remix7531@mailbox.org"; + github = "remix7531"; + githubId = 131352678; + name = "remix7531"; + }; remko = { github = "remko"; githubId = 12300; diff --git a/pkgs/by-name/le/lean-lsp-mcp/package.nix b/pkgs/by-name/le/lean-lsp-mcp/package.nix new file mode 100644 index 000000000000..c1d2d46c1cd9 --- /dev/null +++ b/pkgs/by-name/le/lean-lsp-mcp/package.nix @@ -0,0 +1,47 @@ +{ + lib, + python3Packages, + fetchFromGitHub, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "lean-lsp-mcp"; + version = "0.26.1"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "oOo0oOo"; + repo = "lean-lsp-mcp"; + tag = "v${finalAttrs.version}"; + hash = "sha256-OHbD6HujkXsqe8XpNr1bn+Pel2tbkX7tBapCcUe234o="; + }; + + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ + leanclient + mcp + orjson + certifi + ]; + + pythonRelaxDeps = [ + "mcp" + "leanclient" + ]; + + # Tests require a real Lean toolchain + doCheck = false; + + pythonImportsCheck = [ "lean_lsp_mcp" ]; + + meta = { + description = "MCP server for the Lean theorem prover via the Lean LSP"; + homepage = "https://github.com/oOo0oOo/lean-lsp-mcp"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ remix7531 ]; + mainProgram = "lean-lsp-mcp"; + }; +}) diff --git a/pkgs/development/python-modules/leanclient/default.nix b/pkgs/development/python-modules/leanclient/default.nix new file mode 100644 index 000000000000..8193c41d1585 --- /dev/null +++ b/pkgs/development/python-modules/leanclient/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + hatchling, + + # dependencies + orjson, + psutil, + tqdm, +}: + +buildPythonPackage (finalAttrs: { + pname = "leanclient"; + version = "0.9.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "oOo0oOo"; + repo = "leanclient"; + tag = "v${finalAttrs.version}"; + hash = "sha256-BmIvjFhhlXnyDZWNUZAq41TA+Q5v9UW63rljoeYl44Q="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + orjson + psutil + tqdm + ]; + + # Tests require a real Lean toolchain + doCheck = false; + + pythonImportsCheck = [ "leanclient" ]; + + meta = { + description = "Python client for the Lean theorem prover LSP"; + homepage = "https://github.com/oOo0oOo/leanclient"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ remix7531 ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 39ede7b9e92e..efda7b8958e2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8587,6 +8587,8 @@ self: super: with self; { leanblueprint = callPackage ../development/python-modules/leanblueprint { }; + leanclient = callPackage ../development/python-modules/leanclient { }; + leaone-ble = callPackage ../development/python-modules/leaone-ble { }; leather = callPackage ../development/python-modules/leather { };