2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, blurhash
|
|
|
|
, cryptography
|
|
|
|
, decorator
|
|
|
|
, http-ece
|
|
|
|
, python-dateutil
|
2022-05-18 14:49:53 +00:00
|
|
|
, python-magic
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-vcr
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mastodon-py";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.8.0";
|
|
|
|
|
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "halcy";
|
|
|
|
repo = "Mastodon.py";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-T/yG9LLdttBQ+9vCSit+pyQX/BPqqDXbrTcPfTAUu1U=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '/^addopts/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
blurhash
|
|
|
|
cryptography
|
|
|
|
decorator
|
|
|
|
http-ece
|
|
|
|
python-dateutil
|
2022-05-18 14:49:53 +00:00
|
|
|
python-magic
|
2021-06-28 23:13:55 +00:00
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
pytest-vcr
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "mastodon" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/halcy/Mastodon.py/blob/${src.rev}/CHANGELOG.rst";
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Python wrapper for the Mastodon API";
|
|
|
|
homepage = "https://github.com/halcy/Mastodon.py";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|