diff --git a/pkgs/development/python-modules/fitbit/default.nix b/pkgs/development/python-modules/fitbit/default.nix index b41ac0a4983a..3a1c76776774 100644 --- a/pkgs/development/python-modules/fitbit/default.nix +++ b/pkgs/development/python-modules/fitbit/default.nix @@ -1,41 +1,49 @@ { lib , buildPythonPackage , fetchFromGitHub -, coverage -, python-dateutil , freezegun , mock +, pytestCheckHook +, python-dateutil +, pythonOlder , requests-mock -, requests_oauthlib -, sphinx +, requests-oauthlib }: buildPythonPackage rec { pname = "fitbit"; version = "0.3.1"; + format = "setuptools"; - checkInputs = [ coverage freezegun mock requests-mock sphinx ]; - propagatedBuildInputs = [ python-dateutil requests_oauthlib ]; + disabled = pythonOlder "3.7"; - # The source package on PyPi is missing files required for unit testing. - # https://github.com/orcasgit/python-fitbit/issues/148 src = fetchFromGitHub { - rev = version; owner = "orcasgit"; repo = "python-fitbit"; - sha256 = "1w2lpgf6bs5nbnmslppaf4lbhr9cj6grg0a525xv41jip7iy3vfn"; + rev = version; + hash = "sha256-1u3h47lRBrJ7EUWBl5+RLGW4KHHqXqqrXbboZdy7VPA="; }; - postPatch = '' - substituteInPlace requirements/test.txt \ - --replace 'Sphinx>=1.2,<1.4' 'Sphinx' \ - --replace 'coverage>=3.7,<4.0' 'coverage' - ''; + propagatedBuildInputs = [ + python-dateutil + requests-oauthlib + ]; + + checkInputs = [ + freezegun + mock + pytestCheckHook + requests-mock + ]; + + pythonImportsCheck = [ + "fitbit" + ]; meta = with lib; { description = "Fitbit API Python Client Implementation"; - license = licenses.asl20; homepage = "https://github.com/orcasgit/python-fitbit"; + license = licenses.asl20; maintainers = with maintainers; [ delroth ]; }; }