nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, fetchPypi
3, buildPythonPackage
4, blessed
5, keyring
6, keyrings-alt
7, lxml
8, measurement
9, python-dateutil
10, requests
11, rich
12, typing-extensions
13, pytestCheckHook
14, mock
15, nose
16, pythonOlder
17}:
18
19buildPythonPackage rec {
20 pname = "myfitnesspal";
21 version = "1.17.0";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchPypi {
27 inherit pname version;
28 sha256 = "sha256-UXFvKQtC44EvscYWXK7KI/do3U0wTWI3zKwvsRdzKrs=";
29 };
30
31 propagatedBuildInputs = [
32 blessed
33 keyring
34 keyrings-alt
35 lxml
36 measurement
37 python-dateutil
38 requests
39 rich
40 typing-extensions
41 ];
42
43 checkInputs = [
44 mock
45 nose
46 pytestCheckHook
47 ];
48
49 postPatch = ''
50 # Remove overly restrictive version constraints
51 sed -i -e "s/>=.*//" requirements.txt
52 '';
53
54 disabledTests = [
55 # Integration tests require an account to be set
56 "test_integration"
57 ];
58
59 pythonImportsCheck = [
60 "myfitnesspal"
61 ];
62
63 meta = with lib; {
64 description = "Python module to access meal tracking data stored in MyFitnessPal";
65 homepage = "https://github.com/coddingtonbear/python-myfitnesspal";
66 license = licenses.mit;
67 maintainers = with maintainers; [ bhipple ];
68 };
69}