evcc: 0.131.8 -> 0.131.10 (#364658)
[NixPkgs.git] / pkgs / development / python-modules / daphne / default.nix
blob7e85adb0c29dfe5295f518f8cfe2bbba5170a619
2   lib,
3   stdenv,
4   asgiref,
5   autobahn,
6   buildPythonPackage,
7   django,
8   fetchFromGitHub,
9   fetchpatch2,
10   hypothesis,
11   pytest-asyncio,
12   pytestCheckHook,
13   pythonOlder,
14   setuptools,
15   twisted,
18 buildPythonPackage rec {
19   pname = "daphne";
20   version = "4.1.2";
21   pyproject = true;
23   disabled = pythonOlder "3.8";
25   src = fetchFromGitHub {
26     owner = "django";
27     repo = "daphne";
28     rev = "refs/tags/${version}";
29     hash = "sha256-RAK2CaKKVmVIv1MBK+9xyADOrHq664MQOry4KaGTNCw=";
30   };
32   patches = [
33     # https://github.com/django/daphne/pull/526
34     (fetchpatch2 {
35       name = "fix-tests-with-Twisted-24.7.0.patch";
36       url = "https://github.com/django/daphne/commit/0370c7a0937011d5345b14d484ec171d3ae9f875.patch";
37       hash = "sha256-/3d2pRcEtGvINGHRQF3RZ8IVIETSZb6rhf+ZHUFSQQo=";
38     })
39   ];
41   postPatch = ''
42     substituteInPlace setup.cfg \
43       --replace-fail "pytest-runner" ""
44   '';
46   build-system = [ setuptools ];
48   dependencies = [
49     asgiref
50     autobahn
51     twisted
52   ] ++ twisted.optional-dependencies.tls;
54   nativeCheckInputs = [
55     django
56     hypothesis
57     pytest-asyncio
58     pytestCheckHook
59   ];
61   # Most tests fail on darwin
62   doCheck = !stdenv.hostPlatform.isDarwin;
64   pythonImportsCheck = [ "daphne" ];
66   meta = with lib; {
67     description = "Django ASGI (HTTP/WebSocket) server";
68     homepage = "https://github.com/django/daphne";
69     changelog = "https://github.com/django/daphne/blob/${version}/CHANGELOG.txt";
70     license = licenses.bsd3;
71     maintainers = [ ];
72     mainProgram = "daphne";
73   };