2022-10-21 08:52:14 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, asgiref
|
|
|
|
, autobahn
|
|
|
|
, buildPythonPackage
|
|
|
|
, django
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hypothesis
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, twisted
|
2017-02-20 15:31:36 +00:00
|
|
|
}:
|
2022-10-21 08:52:14 +00:00
|
|
|
|
2017-02-20 15:31:36 +00:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "daphne";
|
2022-10-21 08:52:14 +00:00
|
|
|
version = "4.0.0";
|
|
|
|
format = "setuptools";
|
2017-02-20 15:31:36 +00:00
|
|
|
|
2022-10-21 08:52:14 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2018-02-20 02:26:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "django";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-21 08:52:14 +00:00
|
|
|
hash = "sha256-vPMrmC2B0Pcvk8Y1FsJ4PXnzIMtPod7lL2u0IYNVUxc=";
|
2017-02-20 15:31:36 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 08:52:14 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
asgiref
|
|
|
|
autobahn
|
|
|
|
twisted
|
|
|
|
] ++ twisted.optional-dependencies.tls;
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-21 08:52:14 +00:00
|
|
|
django
|
|
|
|
hypothesis
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
'';
|
2017-02-20 15:31:36 +00:00
|
|
|
|
2022-10-21 08:52:14 +00:00
|
|
|
# Most tests fail on darwin
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2018-02-20 02:26:25 +00:00
|
|
|
|
2022-10-21 08:52:14 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"daphne"
|
|
|
|
];
|
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";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/django/daphne";
|
2022-10-21 08:52:14 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ];
|
2017-02-20 15:31:36 +00:00
|
|
|
};
|
|
|
|
}
|