9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
64 lines
1.1 KiB
Nix
64 lines
1.1 KiB
Nix
{ 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.8.1";
|
|
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "halcy";
|
|
repo = "Mastodon.py";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-r0AAUjd2MBfZANEpyztMNyaQTlGWvWoUVjJNO1eL218=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i '/^addopts/d' setup.cfg
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
blurhash
|
|
cryptography
|
|
decorator
|
|
http-ece
|
|
python-dateutil
|
|
python-magic
|
|
pytz
|
|
requests
|
|
six
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-mock
|
|
pytest-vcr
|
|
requests-mock
|
|
];
|
|
|
|
pythonImportsCheck = [ "mastodon" ];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/halcy/Mastodon.py/blob/${src.rev}/CHANGELOG.rst";
|
|
description = "Python wrapper for the Mastodon API";
|
|
homepage = "https://github.com/halcy/Mastodon.py";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|