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