depot/third_party/nixpkgs/pkgs/development/python-modules/mastodon-py/default.nix

65 lines
1.1 KiB
Nix
Raw Normal View History

{ 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.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "halcy";
repo = "Mastodon.py";
rev = "refs/tags/${version}";
hash = "sha256-T/yG9LLdttBQ+9vCSit+pyQX/BPqqDXbrTcPfTAUu1U=";
};
postPatch = ''
sed -i '/^addopts/d' setup.cfg
'';
propagatedBuildInputs = [
blurhash
cryptography
decorator
http-ece
python-dateutil
python-magic
pytz
requests
six
];
checkInputs = [
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 ];
};
}