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