2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pdm-backend
|
|
|
|
, pydantic
|
|
|
|
, pytest-vcr
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-oauthlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "garth";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.4.42";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-tCQtT7KrM/CHqAaMsvgj4aS3tkpcCYpaagvkO9DljY0=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pdm-backend
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pydantic
|
|
|
|
requests
|
|
|
|
requests-oauthlib
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"garth"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|