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