2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
httpx,
|
|
|
|
pytestCheckHook,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "telegraph";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "2.2.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "telegraph";
|
|
|
|
owner = "python273";
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-xARX8lSOftNVYY4InR5vU4OiguCJJJZv/W76G9eLgNY=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
aio = [ httpx ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/" ];
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests = [ "test_get_page" ];
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "telegraph" ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Telegraph API wrapper";
|
2022-12-28 21:21:41 +00:00
|
|
|
homepage = "https://github.com/python273/telegraph";
|
|
|
|
changelog = "https://github.com/python273/telegraph/releases/tag/v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ gp2112 ];
|
|
|
|
};
|
|
|
|
}
|