Something went wrong. Try again.
lol
Something went wrong. Try again.
1.8 kB · 86 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687{ lib, buildPythonPackage, fetchFromGitHub, blurhash, cryptography, decorator, fetchpatch, graphemeu, http-ece, python-dateutil, python-magic, requests, pytestCheckHook, pytest-cov-stub, pytest-mock, pytest-vcr, requests-mock, setuptools,}:
buildPythonPackage rec { pname = "mastodon-py"; version = "2.1.4"; pyproject = true;
src = fetchFromGitHub { owner = "halcy"; repo = "Mastodon.py"; tag = "v${version}"; hash = "sha256-i3HMT8cabSl664UK3eopJQ9bDBpGCgbHTvBJkgeoxd8="; };
patches = [ # Switch dependency from unmaintained `grapheme` to `graphemeu` (fetchpatch { url = "https://github.com/halcy/Mastodon.py/commit/939c7508414e950922c518260a9ba5a5853aeef2.patch"; hash = "sha256-XBiAFxYUBNyynld++UwPGIIg9j+3/EF2jGqiysVqYRM="; }) ];
build-system = [ setuptools ];
dependencies = [ blurhash decorator python-dateutil python-magic requests ];
optional-dependencies = { blurhash = [ blurhash ]; grapheme = [ graphemeu ]; webpush = [ http-ece cryptography ]; };
nativeCheckInputs = [ pytestCheckHook pytest-cov-stub pytest-mock pytest-vcr requests-mock ] ++ lib.concatAttrValues optional-dependencies;
# disabledTests = [ # "test_notifications_dismiss_pre_2_9_2" # "test_status_card_pre_2_9_2" # "test_stream_user_direct" # "test_stream_user_local" # ];
pythonImportsCheck = [ "mastodon" ];
meta = { changelog = "https://github.com/halcy/Mastodon.py/blob/${src.tag}/CHANGELOG.rst"; description = "Python wrapper for the Mastodon API"; homepage = "https://github.com/halcy/Mastodon.py"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dotlambda ]; };}