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