2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, blessed
|
2022-09-30 11:47:45 +00:00
|
|
|
, browser-cookie3
|
2024-01-13 08:15:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cloudscraper
|
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, keyring
|
|
|
|
, keyrings-alt
|
|
|
|
, lxml
|
|
|
|
, measurement
|
2024-01-13 08:15:51 +00:00
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, python-dateutil
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, requests
|
|
|
|
, rich
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
2022-04-27 09:35:20 +00:00
|
|
|
, typing-extensions
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "myfitnesspal";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.1.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-H9oKSio+2x4TDCB4YN5mmERUEeETLKahPlW3TDDFE/E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
blessed
|
2022-09-30 11:47:45 +00:00
|
|
|
browser-cookie3
|
2024-01-13 08:15:51 +00:00
|
|
|
cloudscraper
|
2021-12-06 16:07:01 +00:00
|
|
|
keyring
|
|
|
|
keyrings-alt
|
|
|
|
lxml
|
|
|
|
measurement
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
rich
|
2022-04-27 09:35:20 +00:00
|
|
|
typing-extensions
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
# Remove overly restrictive version constraints
|
|
|
|
sed -i -e "s/>=.*//" requirements.txt
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Integration tests require an account to be set
|
|
|
|
"test_integration"
|
|
|
|
];
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"myfitnesspal"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Python module to access meal tracking data stored in MyFitnessPal";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "myfitnesspal";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/coddingtonbear/python-myfitnesspal";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
|
|
|
};
|
|
|
|
}
|