diff --git a/pkgs/development/python-modules/smg-grpc-servicer/default.nix b/pkgs/development/python-modules/smg-grpc-servicer/default.nix new file mode 100644 index 000000000000..701466ef7a54 --- /dev/null +++ b/pkgs/development/python-modules/smg-grpc-servicer/default.nix @@ -0,0 +1,57 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + + # build-system + setuptools, + + # dependencies + grpcio, + grpcio-health-checking, + grpcio-reflection, + smg-grpc-proto, +}: +buildPythonPackage (finalAttrs: { + pname = "smg-grpc-servicer"; + version = "0.5.3"; + pyproject = true; + __structuredAttrs = true; + + # No tags on GitHub + src = fetchPypi { + format = "setuptools"; + pname = "smg_grpc_servicer"; + inherit (finalAttrs) version; + hash = "sha256-/stjZWK+5XSTmD9iIRWq+dqthd5kRhty6F7Ffvbfr74="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + grpcio + grpcio-health-checking + grpcio-reflection + smg-grpc-proto + ]; + + postInstall = '' + find $out -name __pycache__ -type d | xargs rm -rv + ''; + + env.PYTHONDONTWRITEBYTECODE = 1; + + pythonImportsCheck = [ "smg_grpc_servicer" ]; + + # no tests + doCheck = false; + + meta = { + description = "SMG gRPC servicer implementations for LLM inference engines (vLLM, SGLang, MLX)"; + homepage = "https://github.com/lightseekorg/smg/tree/main/grpc_servicer"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ prince213 ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5449cdf710a6..b96d3a82ec1d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18222,6 +18222,8 @@ self: super: with self; { smg-grpc-proto = callPackage ../development/python-modules/smg-grpc-proto { }; + smg-grpc-servicer = callPackage ../development/python-modules/smg-grpc-servicer { }; + smhi-pkg = callPackage ../development/python-modules/smhi-pkg { }; smllib = callPackage ../development/python-modules/smllib { };