Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hatchling, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "aiofiles"; 14 version = "23.2.1"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "Tinche"; 21 repo = pname; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-EbRQD/AoTMWAlPOMWmD0UdFjRyjt5MUBkJtcydUCdHM="; 24 }; 25 26 nativeBuildInputs = [ hatchling ]; 27 28 nativeCheckInputs = [ 29 pytest-asyncio 30 pytestCheckHook 31 ]; 32 33 disabledTests = lib.optionals stdenv.isDarwin [ 34 "test_sendfile_file" 35 36 # require loopback networking: 37 "test_sendfile_socket" 38 "test_serve_small_bin_file_sync" 39 "test_serve_small_bin_file" 40 "test_slow_file" 41 ]; 42 43 pythonImportsCheck = [ "aiofiles" ]; 44 45 meta = with lib; { 46 description = "File support for asyncio"; 47 homepage = "https://github.com/Tinche/aiofiles"; 48 license = with licenses; [ asl20 ]; 49 }; 50}