1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "asyncio-dgram";
14 version = "2.2.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "jsbronder";
21 repo = "asyncio-dgram";
22 tag = "v${version}";
23 hash = "sha256-9aO3xFmoR74uZSzxBPRVvz0QSW15TAdWEszLBX8AUR4=";
24 };
25
26 build-system = [ setuptools ];
27
28 nativeCheckInputs = [
29 pytest-asyncio
30 pytestCheckHook
31 ];
32
33 # OSError: AF_UNIX path too long
34 doCheck = !stdenv.hostPlatform.isDarwin;
35
36 disabledTests = [
37 "test_protocol_pause_resume"
38 # TypeError: socket type must be 2
39 "test_from_socket_bad_socket"
40 ];
41
42 pythonImportsCheck = [ "asyncio_dgram" ];
43
44 meta = with lib; {
45 description = "Python support for higher level Datagram";
46 homepage = "https://github.com/jsbronder/asyncio-dgram";
47 changelog = "https://github.com/jsbronder/asyncio-dgram/blob/v${version}/ChangeLog";
48 license = with licenses; [ mit ];
49 maintainers = with maintainers; [ fab ];
50 };
51}