1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
57 lines
1.4 KiB
Nix
57 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
grpcio,
|
|
protobuf,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "grpc-interceptor";
|
|
version = "0.15.4";
|
|
pyproject = true;
|
|
|
|
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 ];
|
|
};
|
|
}
|