nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatchling,
7 hatch-vcs,
8 pytest-asyncio,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "aiofiles";
14 version = "25.1.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "Tinche";
19 repo = "aiofiles";
20 tag = "v${version}";
21 hash = "sha256-NBmzoUb2una3+eWqR1HraVPibaRb9I51aYwskrjxskQ=";
22 };
23
24 build-system = [
25 hatchling
26 hatch-vcs
27 ];
28
29 nativeCheckInputs = [
30 pytest-asyncio
31 pytestCheckHook
32 ];
33
34 disabledTests = lib.optionals stdenv.hostPlatform.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 = [ "aiofiles" ];
45
46 meta = {
47 description = "File support for asyncio";
48 homepage = "https://github.com/Tinche/aiofiles";
49 changelog = "https://github.com/Tinche/aiofiles/releases/tag/${src.tag}";
50 license = lib.licenses.asl20;
51 maintainers = [ ];
52 };
53}