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