From db100ec834f2d00ad7babff90bfb734e949ec949 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Feb 2021 14:51:49 +0100 Subject: [PATCH 1/2] python3Packages.python-twitch-client: init at 0.7.1 --- .../python-twitch-client/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/python-twitch-client/default.nix diff --git a/pkgs/development/python-modules/python-twitch-client/default.nix b/pkgs/development/python-modules/python-twitch-client/default.nix new file mode 100644 index 00000000000..30f6ab9a0a7 --- /dev/null +++ b/pkgs/development/python-modules/python-twitch-client/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, responses +}: + +buildPythonPackage rec { + pname = "python-twitch-client"; + version = "0.7.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "tsifrer"; + repo = pname; + rev = version; + sha256 = "10wwkam3dw0nqr3v9xzigx1zjlrnrhzr7jvihddvzi84vjb6j443"; + }; + + propagatedBuildInputs = [ requests ]; + + checkInputs = [ + pytestCheckHook + responses + ]; + + pythonImportsCheck = [ "twitch" ]; + + meta = with lib; { + description = "Python wrapper for the Twitch API"; + homepage = "https://github.com/tsifrer/python-twitch-client"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8e9824fe901..0fe19a69e61 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6487,6 +6487,8 @@ in { python-toolbox = callPackage ../development/python-modules/python-toolbox { }; + python-twitch-client = callPackage ../development/python-modules/python-twitch-client { }; + python-twitter = callPackage ../development/python-modules/python-twitter { }; python-u2flib-host = callPackage ../development/python-modules/python-u2flib-host { }; From a73ab65d0a68439e8ff6d76acdf579b09e43185d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Feb 2021 14:53:54 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- 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 3c244696f1f..f1425fdedb8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -871,7 +871,7 @@ "twilio_call" = ps: with ps; [ aiohttp-cors twilio ]; "twilio_sms" = ps: with ps; [ aiohttp-cors twilio ]; "twinkly" = ps: with ps; [ ]; # missing inputs: twinkly-client - "twitch" = ps: with ps; [ ]; # missing inputs: python-twitch-client + "twitch" = ps: with ps; [ python-twitch-client ]; "twitter" = ps: with ps; [ ]; # missing inputs: TwitterAPI "ubus" = ps: with ps; [ ]; "ue_smart_radio" = ps: with ps; [ ];