2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pdm-backend,
|
|
|
|
pydantic,
|
|
|
|
pytest-vcr,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-oauthlib,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "garth";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.4.46";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-WuGeZ2EggyhbEDIbjg4ffIFaj2DyHi8Tvowhoi5k2Os=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ pdm-backend ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
pydantic
|
|
|
|
requests
|
|
|
|
requests-oauthlib
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "garth" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_client_request"
|
|
|
|
"test_connectapi"
|
|
|
|
"test_daily"
|
|
|
|
"test_download"
|
|
|
|
"test_exchange"
|
|
|
|
"test_hrv_data_get"
|
|
|
|
"test_login"
|
|
|
|
"test_refresh_oauth2_token"
|
|
|
|
"test_sleep_data"
|
|
|
|
"test_username"
|
|
|
|
"test_weekly"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Garmin SSO auth and connect client";
|
|
|
|
homepage = "https://github.com/matin/garth";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/matin/garth/releases/tag/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|