From e8001bd5f3980c368bbf3f8d94dfb5180e23d50d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 10 Feb 2021 04:20:00 +0000 Subject: [PATCH 1/2] python38Packages.twitch-python: init at 0.0.19 --- .../python-modules/twitch-python/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/twitch-python/default.nix diff --git a/pkgs/development/python-modules/twitch-python/default.nix b/pkgs/development/python-modules/twitch-python/default.nix new file mode 100644 index 00000000000..d4910cfdbe9 --- /dev/null +++ b/pkgs/development/python-modules/twitch-python/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi, requests, rx, pytestCheckHook, responses, isPy3k }: + +buildPythonPackage rec { + pname = "twitch-python"; + version = "0.0.19"; + + src = fetchPypi { + inherit pname version; + sha256 = "b0b02abdd33458e4ffabc632aa6a6779f3599e188819632551353b6c5553f5c5"; + }; + + disabled = !isPy3k; + + postPatch = '' + substituteInPlace setup.py --replace "'pipenv'," "" + ''; + + propagatedBuildInputs = [ requests rx ]; + + checkInputs = [ pytestCheckHook responses ]; + + pythonImportsCheck = [ "twitch" ]; + + meta = with lib; { + description = "Twitch module for Python"; + homepage = "https://github.com/PetterKraabol/Twitch-Python"; + license = licenses.mit; + maintainers = with maintainers; [ marsam ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 08b8cb84675..2da8835ac78 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7927,6 +7927,8 @@ in { twisted = callPackage ../development/python-modules/twisted { }; + twitch-python = callPackage ../development/python-modules/twitch-python { }; + twitter = callPackage ../development/python-modules/twitter { }; twitter-common-collections = callPackage ../development/python-modules/twitter-common-collections { }; From 04562bfeba51cfccb48e06286e5592ad41285dc2 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 10 Feb 2021 04:20:00 +0000 Subject: [PATCH 2/2] twitch-chat-downloader: init at 3.2.1 --- .../misc/twitch-chat-downloader/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/applications/misc/twitch-chat-downloader/default.nix diff --git a/pkgs/applications/misc/twitch-chat-downloader/default.nix b/pkgs/applications/misc/twitch-chat-downloader/default.nix new file mode 100644 index 00000000000..a8ffb46c1f8 --- /dev/null +++ b/pkgs/applications/misc/twitch-chat-downloader/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonApplication +, fetchPypi +, requests +, twitch-python +, pytz +, python-dateutil +}: + +buildPythonApplication rec { + pname = "twitch-chat-downloader"; + version = "3.2.1"; + + src = fetchPypi { + inherit version; + pname = "tcd"; + sha256 = "f9b5ea2ad3badb7deffdd9604368ccb54170cd7929efbaa2d7b534e089ae6338"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "'pipenv>=2020.5.28'," "" + ''; + + propagatedBuildInputs = [ requests twitch-python pytz python-dateutil ]; + + doCheck = false; # no tests + + pythonImportsCheck = [ "tcd" ]; + + meta = with lib; { + description = "Twitch Chat Downloader"; + homepage = "https://github.com/PetterKraabol/Twitch-Chat-Downloader"; + license = licenses.mit; + maintainers = with maintainers; [ marsam ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d248865fb1..e80d4ecab87 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8508,6 +8508,8 @@ in libX11 = xorg.libX11; }; + twitch-chat-downloader = python3Packages.callPackage ../applications/misc/twitch-chat-downloader { }; + twitterBootstrap = callPackage ../development/web/twitter-bootstrap {}; twtxt = callPackage ../applications/networking/twtxt { };