2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, httpx
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
aio = [
|
|
|
|
httpx
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-28 21:21:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_get_page"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|