From b6c3bad619c0de34b26bc791e8dc8651d7ccd4c0 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 7 Jun 2019 11:21:05 +0800 Subject: [PATCH 1/4] python3Packages.py-vapid: init at 1.5.0 --- .../python-modules/py-vapid/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/py-vapid/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 46de38b0bf35..9c89b862ade5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -862,6 +862,8 @@ in { pytricia = callPackage ../development/python-modules/pytricia { }; + py-vapid = callPackage ../development/python-modules/py-vapid { }; + PyWebDAV = callPackage ../development/python-modules/pywebdav { }; pyxml = disabledIf isPy3k (callPackage ../development/python-modules/pyxml{ }); From 0b90dd7822f57dcdd6d8bada3168ccd5f05d11b9 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 7 Jun 2019 11:22:22 +0800 Subject: [PATCH 2/4] python3Packages.http-ece: init at 1.1.0 --- .../python-modules/http-ece/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/http-ece/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9c89b862ade5..abfce31d6b1a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -481,6 +481,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 { }; From 938f13881df4b576155297ce6153697181487f52 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 7 Jun 2019 11:22:49 +0800 Subject: [PATCH 3/4] python3Packages.pywebpush: init at 1.9.4 --- .../python-modules/pywebpush/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/python-modules/pywebpush/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index abfce31d6b1a..345eab23f8c7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -868,6 +868,8 @@ in { 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 { }; From 1d88f4223bafba4296a2c00eef90506493bd561b Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 7 Jun 2019 11:23:11 +0800 Subject: [PATCH 4/4] home-assistant: add support for html5 notifications --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; [ ];