diff --git a/pkgs/development/python-modules/channels/default.nix b/pkgs/development/python-modules/channels/default.nix index 3535f3a44d4..e50dc051361 100644 --- a/pkgs/development/python-modules/channels/default.nix +++ b/pkgs/development/python-modules/channels/default.nix @@ -1,23 +1,43 @@ -{ lib, buildPythonPackage, fetchPypi, - asgiref, django, daphne +{ lib +, buildPythonPackage +, fetchFromGitHub +, asgiref +, django +, daphne +, pytest-asyncio +, pytest-django +, pytestCheckHook }: + buildPythonPackage rec { pname = "channels"; version = "3.0.4"; - src = fetchPypi { - inherit pname version; - sha256 = "0xcbpfisgawqa34ccgz56wzid0ycp3c8wjcppmz8sgd2hx4skngx"; + src = fetchFromGitHub { + owner = "django"; + repo = pname; + rev = version; + sha256 = "0jdylcb77n04rqyzg9v6qfzaxp1dnvdvnxddwh3x1qazw3csi5y2"; }; - # Files are missing in the distribution - doCheck = false; + propagatedBuildInputs = [ + asgiref + django + daphne + ]; - propagatedBuildInputs = [ asgiref django daphne ]; + checkInputs = [ + pytest-asyncio + pytest-django + pytestCheckHook + ]; + + pythonImportsCheck = [ "channels" ]; meta = with lib; { description = "Brings event-driven capabilities to Django with a channel system"; license = licenses.bsd3; homepage = "https://github.com/django/channels"; + maintainers = with maintainers; [ fab ]; }; }