diff --git a/pkgs/development/python-modules/channels/default.nix b/pkgs/development/python-modules/channels/default.nix new file mode 100644 index 000000000000..c7466d242c75 --- /dev/null +++ b/pkgs/development/python-modules/channels/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchurl, + asgiref, django, daphne +}: +buildPythonPackage rec { + name = "channels-${version}"; + version = "1.0.3"; + + src = fetchurl { + url = "mirror://pypi/c/channels/${name}.tar.gz"; + sha256 = "1bwlqnfc27p1qnjmdl8jnr941gpl8ggnxxfy8anh9qgmg20q9pfd"; + }; + + # Files are missing in the distribution + doCheck = false; + + propagatedBuildInputs = [ asgiref django daphne ]; + + meta = with stdenv.lib; { + description = "Brings event-driven capabilities to Django with a channel system"; + license = licenses.bsd3; + homepage = https://github.com/django/channels; + }; +} diff --git a/pkgs/development/python-modules/daphne/default.nix b/pkgs/development/python-modules/daphne/default.nix new file mode 100644 index 000000000000..6e19d9d9e864 --- /dev/null +++ b/pkgs/development/python-modules/daphne/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildPythonPackage, fetchurl, + asgiref, autobahn, twisted +}: +buildPythonPackage rec { + name = "daphne-${version}"; + version = "1.0.3"; + + src = fetchurl { + url = "mirror://pypi/d/daphne/${name}.tar.gz"; + sha256 = "1bpavq3sxr66mqwnnfg67pcchyaq7siqyin2r89aqadf6nab58d2"; + }; + + propagatedBuildInputs = [ asgiref autobahn twisted ]; + + meta = with stdenv.lib; { + description = "Django ASGI (HTTP/WebSocket) server"; + license = licenses.bsd3; + homepage = https://github.com/django/daphne; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 461806f73d02..e8205cb41d2e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2405,26 +2405,7 @@ in { }; }; - channels = buildPythonPackage rec { - name = "channels-${version}"; - version = "1.0.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/c/channels/${name}.tar.gz"; - sha256 = "0d8fywg416p851i8vz26pmz8b47akg5z10yw7xc7i51cpmp7y5zj"; - }; - - # Files are missing in the distribution - doCheck = false; - - propagatedBuildInputs = with self ; [ asgiref django daphne ]; - - meta = { - description = "Brings event-driven capabilities to Django with a channel system"; - license = licenses.bsd3; - homepage = https://github.com/django/channels; - }; - }; + channels = callPackage ../development/python-modules/channels {}; circus = buildPythonPackage rec { name = "circus-0.11.1"; @@ -5928,23 +5909,7 @@ in { }; }); - daphne = buildPythonPackage rec { - name = "daphne-${version}"; - version = "1.0.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/daphne/${name}.tar.gz"; - sha256 = "0l62bd9swv0k9qcpl2s8kj4mgl6qayi0krwkkg1x73a9y48xpi9z"; - }; - - propagatedBuildInputs = with self; [ asgiref autobahn ]; - - meta = { - description = "Django ASGI (HTTP/WebSocket) server"; - license = licenses.bsd3; - homepage = https://github.com/django/daphne; - }; - }; + daphne = callPackage ../development/python-modules/daphne { }; dateparser = buildPythonPackage rec { name = "dateparser-${version}";