Files
nixpkgs/pkgs/development/python-modules/grpc-interceptor/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

60 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
poetry-core,
grpcio,
protobuf,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "grpc-interceptor";
version = "0.15.4";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "d5h-foss";
repo = "grpc-interceptor";
tag = "v${version}";
hash = "sha256-GJkVCslPXShJNDrqhFtCsAK5+VaG8qFJo0RQTsiMIFY=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
grpcio
protobuf
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "grpc_interceptor" ];
meta = {
description = "Simplified gRPC interceptors";
homepage = "https://github.com/d5h-foss/grpc-interceptor";
changelog = "https://github.com/d5h-foss/grpc-interceptor/releases/tag/v${version}";
longDescription = ''
Simplified Python gRPC interceptors.
The Python gRPC package provides service interceptors, but they're a bit
hard to use because of their flexibility. The gRPC interceptors don't
have direct access to the request and response objects, or the service
context. Access to these are often desired, to be able to log data in the
request or response, or set status codes on the context.
'';
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tomaskala ];
};
}