2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
aiocontextvars,
|
|
|
|
aiohttp,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorlog,
|
|
|
|
croniter,
|
|
|
|
fastapi,
|
|
|
|
fetchPypi,
|
|
|
|
logging-journald,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
raven,
|
|
|
|
rich,
|
|
|
|
setproctitle,
|
|
|
|
typing-extensions,
|
|
|
|
uvloop,
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiomisc";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "17.5.26";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-78N8SBzgUB0Lnbj79r3jfhx6ZwlsP9Eq7gTIPkZSPzM=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ poetry-core ];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies =
|
|
|
|
[ colorlog ]
|
|
|
|
++ lib.optionals (pythonOlder "3.11") [ typing-extensions ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ logging-journald ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
aiocontextvars
|
|
|
|
async-timeout
|
|
|
|
fastapi
|
|
|
|
pytestCheckHook
|
|
|
|
setproctitle
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-04-21 15:54:59 +00:00
|
|
|
aiohttp = [ aiohttp ];
|
|
|
|
#asgi = [ aiohttp-asgi ];
|
|
|
|
cron = [ croniter ];
|
|
|
|
#carbon = [ aiocarbon ];
|
|
|
|
raven = [
|
2022-09-30 11:47:45 +00:00
|
|
|
aiohttp
|
2024-04-21 15:54:59 +00:00
|
|
|
raven
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
rich = [ rich ];
|
|
|
|
uvloop = [ uvloop ];
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "aiomisc" ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
# Upstream stopped tagging with 16.2
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# disabledTestPaths = [
|
|
|
|
# # Dependencies are not available at the moment
|
|
|
|
# "tests/test_entrypoint.py"
|
|
|
|
# "tests/test_raven_service.py"
|
|
|
|
# ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Miscellaneous utils for asyncio";
|
|
|
|
homepage = "https://github.com/aiokitchen/aiomisc";
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/aiokitchen/aiomisc/blob/master/CHANGELOG.md";
|
2022-09-30 11:47:45 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|