diff --git a/pkgs/development/python-modules/grpclib/default.nix b/pkgs/development/python-modules/grpclib/default.nix new file mode 100644 index 000000000000..1eb93ece6d6c --- /dev/null +++ b/pkgs/development/python-modules/grpclib/default.nix @@ -0,0 +1,51 @@ +{ buildPythonPackage +, fetchFromGitHub +, lib +, pythonOlder +, h2 +, multidict +, pytestCheckHook +, pytest-asyncio +, async-timeout +, faker +, googleapis-common-protos +, certifi +}: +let + pname = "grpclib"; + version = "0.4.3"; +in +buildPythonPackage { + inherit pname version; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "vmagamedov"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-zjctvsuX5yJl1EXIAaiukWGYJbdgU7OZllgOYAmp1b4="; + }; + + propagatedBuildInputs = [ + h2 + multidict + ]; + + checkInputs = [ + pytestCheckHook + pytest-asyncio + async-timeout + faker + googleapis-common-protos + certifi + ]; + + pythonImportsCheck = [ "grpclib" ]; + + meta = with lib; { + description = "Pure-Python gRPC implementation for asyncio"; + homepage = "https://github.com/vmagamedov/grpclib"; + license = licenses.bsd3; + maintainers = with maintainers; [ nikstur ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e508d5efb878..cb552bc98090 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3948,6 +3948,8 @@ in { grpcio-tools = callPackage ../development/python-modules/grpcio-tools { }; + grpclib = callPackage ../development/python-modules/grpclib { }; + gruut = callPackage ../development/python-modules/gruut { }; gruut-ipa = callPackage ../development/python-modules/gruut-ipa {