Files
nixpkgs/pkgs/development/python-modules/grpclib/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

65 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
certifi,
faker,
fetchFromGitHub,
fetchpatch,
googleapis-common-protos,
h2,
multidict,
pytest-asyncio_0,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "grpclib";
version = "0.4.8";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "vmagamedov";
repo = "grpclib";
tag = "v${version}";
hash = "sha256-Z+DMwGMUxNTQ7ABd4q/FgMHEZ/NCOtst+6QfQJm3jVU=";
};
patches = [
# https://github.com/vmagamedov/grpclib/pull/209
(fetchpatch {
name = "replace-async-timeout-with-asyncio-timeout-patch";
url = "https://github.com/vmagamedov/grpclib/commit/36b23ce3ca3f1742e39b50f939d13cd08b4f28ac.patch";
hash = "sha256-3ztLBOFpTK8CFIp8a6suhWXY5kIBCBRWBX/oAyYU4yI=";
})
];
build-system = [ setuptools ];
dependencies = [
h2
multidict
];
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio_0
faker
googleapis-common-protos
certifi
];
pythonImportsCheck = [ "grpclib" ];
meta = {
description = "Pure-Python gRPC implementation for asyncio";
homepage = "https://github.com/vmagamedov/grpclib";
changelog = "https://github.com/vmagamedov/grpclib/blob/v${version}/docs/changelog/index.rst";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ nikstur ];
};
}