about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/channels
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/channels')
-rw-r--r--nixpkgs/pkgs/development/python-modules/channels/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/channels/default.nix b/nixpkgs/pkgs/development/python-modules/channels/default.nix
new file mode 100644
index 000000000000..083a79284f24
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/channels/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, asgiref
+, buildPythonPackage
+, daphne
+, django
+, fetchFromGitHub
+, async-timeout
+, pytest-asyncio
+, pytest-django
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "channels";
+  version = "4.0.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "django";
+    repo = pname;
+    rev = version;
+    hash = "sha256-n88MxwYQ4O2kBy/W0Zvi3FtIlhZQQRCssB/lYrFNvps=";
+  };
+
+  propagatedBuildInputs = [
+    asgiref
+    django
+  ];
+
+  passthru.optional-dependencies = {
+    daphne = [
+      daphne
+    ];
+  };
+
+  nativeCheckInputs = [
+    async-timeout
+    pytest-asyncio
+    pytest-django
+    pytestCheckHook
+  ] ++ passthru.optional-dependencies.daphne;
+
+  pythonImportsCheck = [
+    "channels"
+  ];
+
+  meta = with lib; {
+    description = "Brings event-driven capabilities to Django with a channel system";
+    homepage = "https://github.com/django/channels";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fab ];
+  };
+}