nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 setuptools,
14 setuptools-scm,
15 pytestCheckHook,
16 raven,
17 rich,
18 setproctitle,
19 uvloop,
20}:
21
22buildPythonPackage (finalAttrs: {
23 pname = "aiomisc";
24 version = "17.10.3";
25 pyproject = true;
26
27 src = fetchPypi {
28 inherit (finalAttrs) pname version;
29 hash = "sha256-24ka982Wx4Bk2TlWuw6pvfRLh47l8QJvHD+sc+LOxVY=";
30 };
31
32 build-system = [
33 setuptools
34 setuptools-scm
35 ];
36
37 dependencies = [
38 colorlog
39 ]
40 ++ lib.optionals stdenv.hostPlatform.isLinux [ logging-journald ];
41
42 nativeCheckInputs = [
43 aiocontextvars
44 async-timeout
45 fastapi
46 pytestCheckHook
47 setproctitle
48 ]
49 ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
50
51 optional-dependencies = {
52 aiohttp = [ aiohttp ];
53 #asgi = [ aiohttp-asgi ];
54 cron = [ croniter ];
55 #carbon = [ aiocarbon ];
56 raven = [
57 aiohttp
58 raven
59 ];
60 rich = [ rich ];
61 uvloop = [ uvloop ];
62 };
63
64 pythonImportsCheck = [ "aiomisc" ];
65
66 # Upstream stopped tagging with 16.2
67 doCheck = false;
68
69 # disabledTestPaths = [
70 # # Dependencies are not available at the moment
71 # "tests/test_entrypoint.py"
72 # "tests/test_raven_service.py"
73 # ];
74
75 meta = {
76 description = "Miscellaneous utils for asyncio";
77 homepage = "https://github.com/aiokitchen/aiomisc";
78 changelog = "https://github.com/aiokitchen/aiomisc/blob/master/CHANGELOG.md";
79 license = lib.licenses.asl20;
80 maintainers = with lib.maintainers; [ fab ];
81 };
82})