Add hotfix for mastodon-py
This commit is contained in:
parent
e2effcee75
commit
57e6bae709
2 changed files with 63 additions and 2 deletions
|
@ -7,7 +7,6 @@
|
|||
flask_mail,
|
||||
flask_migrate,
|
||||
flask_wtf,
|
||||
mastodon-py,
|
||||
pandas,
|
||||
psutil,
|
||||
pygal,
|
||||
|
@ -41,7 +40,7 @@
|
|||
flask_mail
|
||||
flask_migrate
|
||||
flask_wtf
|
||||
mastodon-py
|
||||
(callPackage ../python/mastodon.nix {})
|
||||
pandas
|
||||
psutil
|
||||
pygal
|
||||
|
|
62
python/mastodon.nix
Normal file
62
python/mastodon.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ 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.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "halcy";
|
||||
repo = "Mastodon.py";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-bzacM5bJa936sBW+hgm9GOezW8cVY2oPaWApqjDYLSo=";
|
||||
};
|
||||
|
||||
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; {
|
||||
description = "Python wrapper for the Mastodon API";
|
||||
homepage = "https://github.com/halcy/Mastodon.py";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
|
Reference in a new issue