diff --git a/pkgs/development/python-modules/http-ece/default.nix b/pkgs/development/python-modules/http-ece/default.nix new file mode 100644 index 000000000000..1f50608d3d1b --- /dev/null +++ b/pkgs/development/python-modules/http-ece/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchPypi, buildPythonPackage +, coverage, flake8, mock, nose +, cryptography }: + +buildPythonPackage rec { + pname = "http_ece"; + version = "1.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1y5ln09ji4dwpzhxr77cggk02kghq7lql60a6969a5n2lwpvqblk"; + }; + + propagatedBuildInputs = [ cryptography ]; + + checkInputs = [ coverage flake8 mock nose ]; + + meta = with lib; { + description = "Encipher HTTP Messages"; + homepage = https://github.com/martinthomson/encrypted-content-encoding; + license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; + }; +} diff --git a/pkgs/development/python-modules/py-vapid/default.nix b/pkgs/development/python-modules/py-vapid/default.nix new file mode 100644 index 000000000000..d5af1c1c33dd --- /dev/null +++ b/pkgs/development/python-modules/py-vapid/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi +, flake8, mock, nose, pytest +, cryptography +}: + +buildPythonPackage rec { + pname = "py-vapid"; + version = "1.5.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1b3g4ljkpi6ka5n63bl5y47r3qhxjmr6qfamqwxnmna2567b5las"; + }; + + propagatedBuildInputs = [ cryptography ]; + + checkInputs = [ flake8 mock nose pytest ]; + + meta = with lib; { + description = "VAPID is a voluntary standard for WebPush subscription providers"; + homepage = https://github.com/mozilla-services/vapid; + license = licenses.mpl20; + }; +} diff --git a/pkgs/development/python-modules/pywebpush/default.nix b/pkgs/development/python-modules/pywebpush/default.nix new file mode 100644 index 000000000000..c9077c7a17c4 --- /dev/null +++ b/pkgs/development/python-modules/pywebpush/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchPypi, buildPythonPackage +, coverage, flake8, mock, nose +, http-ece, py-vapid, requests }: + +buildPythonPackage rec { + pname = "pywebpush"; + version = "1.9.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "03qkijz56fx7p8405sknw2wji4pfj5knajk2lmj9y58mjxydbpp3"; + }; + + propagatedBuildInputs = [ + http-ece py-vapid requests + ]; + + checkInputs = [ + coverage flake8 mock nose + ]; + + meta = with lib; { + description = "Webpush Data encryption library for Python"; + homepage = https://github.com/web-push-libs/pywebpush; + license = licenses.mpl20; + maintainers = with maintainers; [ peterhoeg ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 223e2ff8f5ec..09c1ec3592d0 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -302,7 +302,7 @@ "hook" = ps: with ps; [ ]; "horizon" = ps: with ps; [ ]; "hp_ilo" = ps: with ps; [ ]; - "html5" = ps: with ps; [ aiohttp-cors ]; + "html5" = ps: with ps; [ aiohttp-cors pywebpush ]; "http" = ps: with ps; [ aiohttp-cors ]; "htu21d" = ps: with ps; [ ]; "huawei_lte" = ps: with ps; [ ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a84637f8b371..828cf517d5c8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -492,6 +492,8 @@ in { hopcroftkarp = callPackage ../development/python-modules/hopcroftkarp { }; + http-ece = callPackage ../development/python-modules/http-ece { }; + httpsig = callPackage ../development/python-modules/httpsig { }; httptools = callPackage ../development/python-modules/httptools { }; @@ -877,8 +879,12 @@ in { pytricia = callPackage ../development/python-modules/pytricia { }; + py-vapid = callPackage ../development/python-modules/py-vapid { }; + PyWebDAV = callPackage ../development/python-modules/pywebdav { }; + pywebpush = callPackage ../development/python-modules/pywebpush { }; + pyxml = disabledIf isPy3k (callPackage ../development/python-modules/pyxml{ }); pyvcd = callPackage ../development/python-modules/pyvcd { };