From 43ced3efad28bcd68ef4fc08e7e53994c79e7877 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Jul 2021 23:01:54 +0200 Subject: [PATCH 1/2] python3Packages.channels: 3.0.3 -> 3.0.4 --- pkgs/development/python-modules/channels/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/channels/default.nix b/pkgs/development/python-modules/channels/default.nix index 0f5e708d0913..3535f3a44d41 100644 --- a/pkgs/development/python-modules/channels/default.nix +++ b/pkgs/development/python-modules/channels/default.nix @@ -3,11 +3,11 @@ }: buildPythonPackage rec { pname = "channels"; - version = "3.0.3"; + version = "3.0.4"; src = fetchPypi { inherit pname version; - sha256 = "056b72e51080a517a0f33a0a30003e03833b551d75394d6636c885d4edb8188f"; + sha256 = "0xcbpfisgawqa34ccgz56wzid0ycp3c8wjcppmz8sgd2hx4skngx"; }; # Files are missing in the distribution From 79953c4bc323ec2cf698a1c73b50dc4827d4dd14 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Jul 2021 21:00:45 +0200 Subject: [PATCH 2/2] python3Packages.channels: enable tests --- .../python-modules/channels/default.nix | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/channels/default.nix b/pkgs/development/python-modules/channels/default.nix index 3535f3a44d41..e50dc051361a 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 ]; }; }