1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, blurhash
5, cryptography
6, decorator
7, http-ece
8, python-dateutil
9, python-magic
10, pytz
11, requests
12, six
13, pytestCheckHook
14, pytest-mock
15, pytest-vcr
16, requests-mock
17}:
18
19buildPythonPackage rec {
20 pname = "mastodon-py";
21 version = "1.8.1";
22
23 format = "setuptools";
24
25 src = fetchFromGitHub {
26 owner = "halcy";
27 repo = "Mastodon.py";
28 rev = "refs/tags/${version}";
29 hash = "sha256-r0AAUjd2MBfZANEpyztMNyaQTlGWvWoUVjJNO1eL218=";
30 };
31
32 postPatch = ''
33 sed -i '/^addopts/d' setup.cfg
34 '';
35
36 propagatedBuildInputs = [
37 blurhash
38 cryptography
39 decorator
40 http-ece
41 python-dateutil
42 python-magic
43 pytz
44 requests
45 six
46 ];
47
48 nativeCheckInputs = [
49 pytestCheckHook
50 pytest-mock
51 pytest-vcr
52 requests-mock
53 ];
54
55 pythonImportsCheck = [ "mastodon" ];
56
57 meta = with lib; {
58 changelog = "https://github.com/halcy/Mastodon.py/blob/${src.rev}/CHANGELOG.rst";
59 description = "Python wrapper for the Mastodon API";
60 homepage = "https://github.com/halcy/Mastodon.py";
61 license = licenses.mit;
62 maintainers = with maintainers; [ dotlambda ];
63 };
64}