From 566b3e38ab8cf9eea857e72fb78f4abb89fb2b28 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 22 Feb 2023 13:35:58 +0100 Subject: [PATCH] python3Packages.notifications-android-tv: init at 1.0.0 Needed by the "nfandroidtv" integration of Home Assistant. --- .../notifications-android-tv/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/notifications-android-tv/default.nix diff --git a/pkgs/development/python-modules/notifications-android-tv/default.nix b/pkgs/development/python-modules/notifications-android-tv/default.nix new file mode 100644 index 000000000000..00e43cfe1879 --- /dev/null +++ b/pkgs/development/python-modules/notifications-android-tv/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, poetry-core +, pytest-asyncio +, pytest-httpx +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "notifications-android-tv"; + version = "1.0.0"; + format = "pyproject"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "engrbm87"; + repo = "notifications_android_tv"; + rev = version; + hash = "sha256-Xr+d2uYzgFp/Fb00ymov02+GYnwjGc3FbJ/rIvQXzCE="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + httpx + ]; + + pythonImportsCheck = [ "notifications_android_tv" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + checkInputs = [ + pytest-asyncio + pytest-httpx + ]; + + meta = with lib; { + description = "Python API for sending notifications to Android/Fire TVs"; + homepage = "https://github.com/engrbm87/notifications_android_tv"; + changelog = "https://github.com/engrbm87/notifications_android_tv/blob/${version}/CHANGES.rst"; + license = licenses.mit; + maintainers = with maintainers; [ dominikh ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c81f05e35d94..e856ddb72bcd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6621,6 +6621,8 @@ self: super: with self; { notedown = callPackage ../development/python-modules/notedown { }; + notifications-android-tv = callPackage ../development/python-modules/notifications-android-tv { }; + notifications-python-client = callPackage ../development/python-modules/notifications-python-client { }; notify-events = callPackage ../development/python-modules/notify-events { };