From 3ce904abb61cd039e1512a1d3c8509fda9e4957f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Feb 2021 10:29:01 +0100 Subject: [PATCH 1/2] python3Packages.twitterapi: init 2.6.6 --- .../python-modules/twitterapi/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/twitterapi/default.nix diff --git a/pkgs/development/python-modules/twitterapi/default.nix b/pkgs/development/python-modules/twitterapi/default.nix new file mode 100644 index 00000000000..f7c5d4d2e8b --- /dev/null +++ b/pkgs/development/python-modules/twitterapi/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, requests_oauthlib +}: + +buildPythonPackage rec { + pname = "twitterapi"; + version = "2.6.6"; + + src = fetchFromGitHub { + owner = "geduldig"; + repo = "TwitterAPI"; + rev = "v${version}"; + sha256 = "0ib4yggigpkn8rp71j94xyxl20smh3d04xsa9fhyh0mws4ri33j8"; + }; + + propagatedBuildInputs = [ + requests + requests_oauthlib + ]; + + # Tests are interacting with the Twitter API + doCheck = false; + pythonImportsCheck = [ "TwitterAPI" ]; + + meta = with lib; { + description = "Python wrapper for Twitter's REST and Streaming APIs"; + homepage = "https://github.com/geduldig/TwitterAPI"; + 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 88b66b1420e..f9adca774f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8031,6 +8031,8 @@ in { twitter-common-options = callPackage ../development/python-modules/twitter-common-options { }; + twitterapi = callPackage ../development/python-modules/twitterapi { }; + twofish = callPackage ../development/python-modules/twofish { }; txaio = callPackage ../development/python-modules/txaio { }; From 9067b794d35dc7da343255392307959ad0a9ce09 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Feb 2021 10:29:26 +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 a4e480c4550..4bfba9ee807 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -872,7 +872,7 @@ "twilio_sms" = ps: with ps; [ aiohttp-cors twilio ]; "twinkly" = ps: with ps; [ ]; # missing inputs: twinkly-client "twitch" = ps: with ps; [ python-twitch-client ]; - "twitter" = ps: with ps; [ ]; # missing inputs: TwitterAPI + "twitter" = ps: with ps; [ twitterapi ]; "ubus" = ps: with ps; [ ]; "ue_smart_radio" = ps: with ps; [ ]; "uk_transport" = ps: with ps; [ ];