1{ lib
2, stdenv
3, async-timeout
4, buildPythonPackage
5, fetchFromGitHub
6, pytest-asyncio
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 version = "3.5.2";
13 pname = "asgiref";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "django";
20 repo = pname;
21 rev = version;
22 sha256 = "sha256-56suF63ePRDprqODhVIPCEGiO8UGgWrpwg2wYEs6OOE=";
23 };
24
25 propagatedBuildInputs = [
26 async-timeout
27 ];
28
29 checkInputs = [
30 pytestCheckHook
31 pytest-asyncio
32 ];
33
34 disabledTests = lib.optionals stdenv.isDarwin [
35 "test_multiprocessing"
36 ];
37
38 pythonImportsCheck = [ "asgiref" ];
39
40 meta = with lib; {
41 description = "Reference ASGI adapters and channel layers";
42 homepage = "https://github.com/django/asgiref";
43 license = licenses.bsd3;
44 maintainers = with maintainers; [ SuperSandro2000 ];
45 };
46}