1{
2 lib,
3 stdenv,
4 aiomisc,
5 buildPythonPackage,
6 fetchFromGitHub,
7 pytest-aiohttp,
8 pytest-asyncio_0,
9 pytest8_3CheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "caio";
16 version = "0.9.22";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "mosquito";
23 repo = "caio";
24 tag = version;
25 hash = "sha256-O86SLZ+8bzPYtvLnmY5gLPYLWvNaktQwIEQckJR15LI=";
26 };
27
28 build-system = [ setuptools ];
29
30 nativeCheckInputs = [
31 aiomisc
32 (pytest-aiohttp.override { pytest-asyncio = pytest-asyncio_0; })
33 pytest8_3CheckHook
34 ];
35
36 env.NIX_CFLAGS_COMPILE = toString (
37 lib.optionals stdenv.cc.isClang [ "-Wno-error=implicit-function-declaration" ]
38 );
39
40 pythonImportsCheck = [ "caio" ];
41
42 meta = with lib; {
43 description = "File operations with asyncio support";
44 homepage = "https://github.com/mosquito/caio";
45 changelog = "https://github.com/mosquito/caio/releases/tag/${version}";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ fab ];
48 };
49}