1{ 2 lib, 3 stdenv, 4 asgiref, 5 autobahn, 6 buildPythonPackage, 7 django, 8 fetchFromGitHub, 9 hypothesis, 10 pytest-asyncio, 11 pytestCheckHook, 12 setuptools, 13 twisted, 14}: 15 16buildPythonPackage rec { 17 pname = "daphne"; 18 version = "4.2.1"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "django"; 23 repo = "daphne"; 24 tag = version; 25 hash = "sha256-MPlvXcg7bBF1yaphjjMtnGsGpp6ca5GsgmXONw/V9Do="; 26 }; 27 28 build-system = [ setuptools ]; 29 30 dependencies = [ 31 asgiref 32 autobahn 33 twisted 34 ] 35 ++ twisted.optional-dependencies.tls; 36 37 nativeCheckInputs = [ 38 django 39 hypothesis 40 pytest-asyncio 41 pytestCheckHook 42 ]; 43 44 # Most tests fail on darwin 45 doCheck = !stdenv.hostPlatform.isDarwin; 46 47 pythonImportsCheck = [ "daphne" ]; 48 49 meta = with lib; { 50 description = "Django ASGI (HTTP/WebSocket) server"; 51 homepage = "https://github.com/django/daphne"; 52 changelog = "https://github.com/django/daphne/blob/${src.tag}/CHANGELOG.txt"; 53 license = licenses.bsd3; 54 maintainers = [ ]; 55 mainProgram = "daphne"; 56 }; 57}