1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, pytest-asyncio
6, pytestCheckHook
7, pythonOlder
8, typing-extensions
9}:
10
11buildPythonPackage rec {
12 version = "3.7.2";
13 pname = "asgiref";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "django";
20 repo = "asgiref";
21 rev = "refs/tags/${version}";
22 hash = "sha256-VW1PBh6+nLMD7qxmL83ymuxCPYKVY3qGKsB7ZiMqMu8=";
23 };
24
25 propagatedBuildInputs = [
26 typing-extensions
27 ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 pytest-asyncio
32 ];
33
34 disabledTests = lib.optionals stdenv.isDarwin [
35 "test_multiprocessing"
36 ];
37
38 __darwinAllowLocalNetworking = true;
39
40 pythonImportsCheck = [ "asgiref" ];
41
42 meta = with lib; {
43 changelog = "https://github.com/django/asgiref/blob/${src.rev}/CHANGELOG.txt";
44 description = "Reference ASGI adapters and channel layers";
45 homepage = "https://github.com/django/asgiref";
46 license = licenses.bsd3;
47 maintainers = with maintainers; [ ];
48 };
49}