2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, garth
|
|
|
|
, pdm-backend
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
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
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "garminconnect";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.2.9";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
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}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-wQWOksI0nfzIMdxgZehMmNytuXWD22GLUNoI7Ki0C3s=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pdm-backend
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
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;
|
|
|
|
|
2022-02-10 20:34:41 +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 ];
|
|
|
|
};
|
|
|
|
}
|