nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix
Martin Weinelt 0215034f25 python3.pkgs: Migrate fetchers to use hash
when they already rely on SRI hashes.
2023-03-03 23:59:29 +01:00

72 lines
1.2 KiB
Nix

{ lib
, fetchPypi
, buildPythonPackage
, blessed
, browser-cookie3
, keyring
, keyrings-alt
, lxml
, measurement
, python-dateutil
, requests
, rich
, typing-extensions
, pytestCheckHook
, mock
, nose
, pythonOlder
}:
buildPythonPackage rec {
pname = "myfitnesspal";
version = "2.0.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-wlQ/mo9MBQo0t1p0h6/TJir3I87DKYAUc022T3hZjH8=";
};
propagatedBuildInputs = [
blessed
browser-cookie3
keyring
keyrings-alt
lxml
measurement
python-dateutil
requests
rich
typing-extensions
];
nativeCheckInputs = [
mock
nose
pytestCheckHook
];
postPatch = ''
# Remove overly restrictive version constraints
sed -i -e "s/>=.*//" requirements.txt
'';
disabledTests = [
# Integration tests require an account to be set
"test_integration"
];
pythonImportsCheck = [
"myfitnesspal"
];
meta = with lib; {
description = "Python module to access meal tracking data stored in MyFitnessPal";
homepage = "https://github.com/coddingtonbear/python-myfitnesspal";
license = licenses.mit;
maintainers = with maintainers; [ bhipple ];
};
}