at master 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 aiocontextvars, 5 aiohttp, 6 async-timeout, 7 buildPythonPackage, 8 colorlog, 9 croniter, 10 fastapi, 11 fetchPypi, 12 logging-journald, 13 poetry-core, 14 pytestCheckHook, 15 pythonOlder, 16 raven, 17 rich, 18 setproctitle, 19 typing-extensions, 20 uvloop, 21}: 22 23buildPythonPackage rec { 24 pname = "aiomisc"; 25 version = "17.9.4"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.8"; 29 30 src = fetchPypi { 31 inherit pname version; 32 hash = "sha256-oSwMhomcPIN2JYterJuBUcmJtUx3rayADH1ugah+pI8="; 33 }; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 colorlog 39 ] 40 ++ lib.optionals (pythonOlder "3.11") [ typing-extensions ] 41 ++ lib.optionals stdenv.hostPlatform.isLinux [ logging-journald ]; 42 43 nativeCheckInputs = [ 44 aiocontextvars 45 async-timeout 46 fastapi 47 pytestCheckHook 48 setproctitle 49 ] 50 ++ lib.flatten (builtins.attrValues optional-dependencies); 51 52 optional-dependencies = { 53 aiohttp = [ aiohttp ]; 54 #asgi = [ aiohttp-asgi ]; 55 cron = [ croniter ]; 56 #carbon = [ aiocarbon ]; 57 raven = [ 58 aiohttp 59 raven 60 ]; 61 rich = [ rich ]; 62 uvloop = [ uvloop ]; 63 }; 64 65 pythonImportsCheck = [ "aiomisc" ]; 66 67 # Upstream stopped tagging with 16.2 68 doCheck = false; 69 70 # disabledTestPaths = [ 71 # # Dependencies are not available at the moment 72 # "tests/test_entrypoint.py" 73 # "tests/test_raven_service.py" 74 # ]; 75 76 meta = with lib; { 77 description = "Miscellaneous utils for asyncio"; 78 homepage = "https://github.com/aiokitchen/aiomisc"; 79 changelog = "https://github.com/aiokitchen/aiomisc/blob/master/CHANGELOG.md"; 80 license = licenses.asl20; 81 maintainers = with maintainers; [ fab ]; 82 }; 83}