1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, poetry-core 6, arrow 7, requests-oauthlib 8, typing-extensions 9, pydantic 10, responses 11, pytestCheckHook 12}: 13 14buildPythonPackage rec { 15 pname = "withings-api"; 16 version = "2.4.0"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "vangorra"; 23 repo = "python_withings_api"; 24 rev = "refs/tags/${version}"; 25 sha256 = "sha256-8cOLHYnodPGk1b1n6xbVyW2iju3cG6MgnzYTKDsP/nw="; 26 }; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace 'requests-oauth = ">=0.4.1"' ''' \ 31 --replace 'addopts = "--capture no --cov ./withings_api --cov-report html:build/coverage_report --cov-report term --cov-report xml:build/coverage.xml"' ''' 32 ''; 33 34 nativeBuildInputs = [ 35 poetry-core 36 ]; 37 38 propagatedBuildInputs = [ 39 arrow 40 requests-oauthlib 41 typing-extensions 42 pydantic 43 ]; 44 45 checkInputs = [ 46 pytestCheckHook 47 responses 48 ]; 49 50 meta = with lib; { 51 description = "Library for the Withings Health API"; 52 homepage = "https://github.com/vangorra/python_withings_api"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ kittywitch ]; 55 }; 56}