From 523638bffc691c8f14596671d106438d4a282cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 14 Jun 2021 00:33:46 +0200 Subject: [PATCH] python3Packages.mastodon-py: init at 1.5.1 --- .../python-modules/mastodon-py/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/mastodon-py/default.nix diff --git a/pkgs/development/python-modules/mastodon-py/default.nix b/pkgs/development/python-modules/mastodon-py/default.nix new file mode 100644 index 000000000000..c1a7c8985b78 --- /dev/null +++ b/pkgs/development/python-modules/mastodon-py/default.nix @@ -0,0 +1,61 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, blurhash +, cryptography +, decorator +, http-ece +, python-dateutil +, python_magic +, pytz +, requests +, six +, pytestCheckHook +, pytest-mock +, pytest-vcr +, requests-mock +}: + +buildPythonPackage rec { + pname = "mastodon-py"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "halcy"; + repo = "Mastodon.py"; + rev = version; + sha256 = "044iqydw69a6xpz2hdjv1fc6a9b7bqdpnh3b33xqbks9d2415ddm"; + }; + + postPatch = '' + sed -i '/^addopts/d' setup.cfg + ''; + + propagatedBuildInputs = [ + blurhash + cryptography + decorator + http-ece + python-dateutil + python_magic + pytz + requests + six + ]; + + checkInputs = [ + pytestCheckHook + pytest-mock + pytest-vcr + requests-mock + ]; + + pythonImportsCheck = [ "mastodon" ]; + + meta = with lib; { + description = "Python wrapper for the Mastodon API"; + homepage = "https://github.com/halcy/Mastodon.py"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a4144b86e6ac..5c9d5ea5b121 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4206,6 +4206,8 @@ in { mask-rcnn = callPackage ../development/python-modules/mask-rcnn { }; + mastodon-py = callPackage ../development/python-modules/mastodon-py { }; + mat2 = callPackage ../development/python-modules/mat2 { }; matchpy = callPackage ../development/python-modules/matchpy { };