1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 orjson, 6 quantile-python, 7 aiohttp, 8 aiohttp-basicauth, 9 starlette, 10 quart, 11 pytestCheckHook, 12 httpx, 13 fastapi, 14 uvicorn, 15 pythonOlder, 16}: 17 18buildPythonPackage rec { 19 pname = "aioprometheus"; 20 version = "unstable-2023-03-14"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "claws"; 27 repo = "aioprometheus"; 28 rev = "4786678b413d166c0b6e0041558d11bc1a7097b2"; 29 hash = "sha256-2z68rQkMjYqkszg5Noj9owWUWQGOEp/91RGiWiyZVOY="; 30 }; 31 32 propagatedBuildInputs = [ 33 orjson 34 quantile-python 35 ]; 36 37 optional-dependencies = { 38 aiohttp = [ aiohttp ]; 39 starlette = [ starlette ]; 40 quart = [ quart ]; 41 }; 42 43 nativeCheckInputs = [ 44 pytestCheckHook 45 aiohttp-basicauth 46 httpx 47 fastapi 48 uvicorn 49 ] 50 ++ lib.flatten (builtins.attrValues optional-dependencies); 51 52 pythonImportsCheck = [ "aioprometheus" ]; 53 54 meta = with lib; { 55 description = "Prometheus Python client library for asyncio-based applications"; 56 homepage = "https://github.com/claws/aioprometheus"; 57 changelog = "https://github.com/claws/aioprometheus/blob/${src.rev}/CHANGELOG.md"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ mbalatsko ]; 60 }; 61}