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 = "22.1.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 = "sha256-2itjGYusJT6sbCAgvKsI9IXeAOP7VQV0bpifFBZmnAo=";
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 # require loopback networking:
38 "test_sendfile_socket"
39 "test_serve_small_bin_file_sync"
40 "test_serve_small_bin_file"
41 "test_slow_file"
42 ];
43
44 pythonImportsCheck = [
45 "aiofiles"
46 ];
47
48 meta = {
49 description = "File support for asyncio";
50 homepage = "https://github.com/Tinche/aiofiles";
51 license = with lib.licenses; [ asl20 ];
52 maintainers = with lib.maintainers; [ fridh ];
53 };
54}