diff --git a/pkgs/development/python-modules/daphne/default.nix b/pkgs/development/python-modules/daphne/default.nix index a5699289f24b..0965dacd4232 100644 --- a/pkgs/development/python-modules/daphne/default.nix +++ b/pkgs/development/python-modules/daphne/default.nix @@ -10,24 +10,32 @@ pytest-asyncio, pytestCheckHook, pythonOlder, + setuptools, twisted, }: buildPythonPackage rec { pname = "daphne"; - version = "4.0.0"; - format = "setuptools"; + version = "4.1.2"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "django"; - repo = pname; - rev = version; - hash = "sha256-vPMrmC2B0Pcvk8Y1FsJ4PXnzIMtPod7lL2u0IYNVUxc="; + repo = "daphne"; + rev = "refs/tags/${version}"; + hash = "sha256-RAK2CaKKVmVIv1MBK+9xyADOrHq664MQOry4KaGTNCw="; }; - propagatedBuildInputs = [ + postPatch = '' + substituteInPlace setup.cfg \ + --replace-fail "pytest-runner" "" + ''; + + build-system = [ setuptools ]; + + dependencies = [ asgiref autobahn twisted @@ -40,11 +48,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "pytest-runner" "" - ''; - # Most tests fail on darwin doCheck = !stdenv.isDarwin; @@ -52,9 +55,10 @@ buildPythonPackage rec { meta = with lib; { description = "Django ASGI (HTTP/WebSocket) server"; - mainProgram = "daphne"; homepage = "https://github.com/django/daphne"; + changelog = "https://github.com/django/daphne/blob/${version}/CHANGELOG.txt"; license = licenses.bsd3; maintainers = with maintainers; [ ]; + mainProgram = "daphne"; }; }