2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
garth,
|
|
|
|
pdm-backend,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
withings-sync,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "garminconnect";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.2.19";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cyberjunky";
|
2022-02-10 20:34:41 +00:00
|
|
|
repo = "python-garminconnect";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-v3Z6cUHqE52BJUgfyWMojwdbxWIEyNR8c/oNS9QEFeA=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ pdm-backend ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
garth
|
2021-06-28 23:13:55 +00:00
|
|
|
requests
|
2023-11-16 04:20:00 +00:00
|
|
|
withings-sync
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Tests require a token
|
2021-06-28 23:13:55 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "garminconnect" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-02-10 20:34:41 +00:00
|
|
|
description = "Garmin Connect Python API wrapper";
|
|
|
|
homepage = "https://github.com/cyberjunky/python-garminconnect";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/cyberjunky/python-garminconnect/releases/tag/${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|