nixpkgs/pkgs/development/python-modules/mastodon-py/default.nix
2023-05-26 21:17:35 +00:00

65 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 ];
};
}