2020-07-06 02:28:11 -07:00
|
|
|
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub
|
2018-02-19 18:26:25 -08:00
|
|
|
, asgiref, autobahn, twisted, pytestrunner
|
2020-07-06 02:28:11 -07:00
|
|
|
, hypothesis, pytest, pytest-asyncio, service-identity, pyopenssl
|
2017-02-20 07:31:36 -08:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 02:25:35 -07:00
|
|
|
pname = "daphne";
|
2020-07-06 02:28:11 -07:00
|
|
|
version = "2.5.0";
|
2017-02-20 07:31:36 -08:00
|
|
|
|
2018-02-19 18:26:25 -08:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "django";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-07-06 02:28:11 -07:00
|
|
|
sha256 = "0qkhmblj3a5s3z65cgz46xsvq1b6x4m3kr6aljjnxnv7hcwib02n";
|
2017-02-20 07:31:36 -08:00
|
|
|
};
|
|
|
|
|
2018-02-19 18:26:25 -08:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
|
|
|
|
2020-07-06 02:28:11 -07:00
|
|
|
propagatedBuildInputs = [ asgiref autobahn twisted service-identity pyopenssl ];
|
2017-02-20 07:31:36 -08:00
|
|
|
|
2018-02-19 18:26:25 -08:00
|
|
|
checkInputs = [ hypothesis pytest pytest-asyncio ];
|
|
|
|
|
2018-09-13 07:30:35 -07:00
|
|
|
doCheck = !stdenv.isDarwin; # most tests fail on darwin
|
|
|
|
|
2018-02-19 18:26:25 -08:00
|
|
|
checkPhase = ''
|
2018-09-13 07:30:35 -07:00
|
|
|
py.test
|
2018-02-19 18:26:25 -08:00
|
|
|
'';
|
|
|
|
|
2017-02-20 07:31:36 -08:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Django ASGI (HTTP/WebSocket) server";
|
|
|
|
license = licenses.bsd3;
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/django/daphne";
|
2017-02-20 07:31:36 -08:00
|
|
|
};
|
|
|
|
}
|