2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, isPy3k, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, asgiref, autobahn, twisted, pytestrunner
|
2020-08-20 17:08:02 +00:00
|
|
|
, hypothesis, pytest, pytest-asyncio, service-identity, pyopenssl
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "daphne";
|
2021-07-03 03:11:41 +00:00
|
|
|
version = "3.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "django";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-03 03:11:41 +00:00
|
|
|
sha256 = "sha256-KWkMV4L7bA2Eo/u4GGif6lmDNrZAzvYyDiyzyWt9LeI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = [ asgiref autobahn twisted service-identity pyopenssl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ hypothesis pytest pytest-asyncio ];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin; # most tests fail on darwin
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Django ASGI (HTTP/WebSocket) server";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://github.com/django/daphne";
|
|
|
|
};
|
|
|
|
}
|