1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, poetry-core
6, pytest-asyncio
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "aiofiles";
13 version = "0.7.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "Tinche";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "0vvk9j8cfdqvq8hw2qc6ajfzsy8x1afabf83mxafffq92rwknd4y";
23 };
24
25 nativeBuildInputs = [
26 poetry-core
27 ];
28
29 checkInputs = [
30 pytest-asyncio
31 pytestCheckHook
32 ];
33
34 disabledTests = lib.optionals stdenv.isDarwin [
35 "test_sendfile_file"
36 ];
37
38 pythonImportsCheck = [ "aiofiles" ];
39
40 meta = {
41 description = "File support for asyncio";
42 homepage = "https://github.com/Tinche/aiofiles";
43 license = with lib.licenses; [ asl20 ];
44 maintainers = with lib.maintainers; [ fridh ];
45 };
46}