1{ 2 lib, 3 arrow, 4 buildPythonPackage, 5 fetchFromGitHub, 6 poetry-core, 7 pydantic, 8 pytest-cov-stub, 9 pytestCheckHook, 10 pythonOlder, 11 requests-oauthlib, 12 responses, 13 typing-extensions, 14}: 15 16buildPythonPackage rec { 17 pname = "withings-api"; 18 version = "2.4.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "vangorra"; 25 repo = "python_withings_api"; 26 tag = version; 27 hash = "sha256-8cOLHYnodPGk1b1n6xbVyW2iju3cG6MgnzYTKDsP/nw="; 28 }; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace-fail 'requests-oauth = ">=0.4.1"' ''' 33 ''; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 arrow 39 requests-oauthlib 40 typing-extensions 41 pydantic 42 ]; 43 44 nativeCheckInputs = [ 45 pytest-cov-stub 46 pytestCheckHook 47 responses 48 ]; 49 50 pythonImportsCheck = [ "withings_api" ]; 51 52 meta = with lib; { 53 description = "Library for the Withings Health API"; 54 homepage = "https://github.com/vangorra/python_withings_api"; 55 changelog = "https://github.com/vangorra/python_withings_api/releases/tag/${version}"; 56 license = licenses.mit; 57 maintainers = with maintainers; [ kittywitch ]; 58 broken = versionAtLeast pydantic.version "2"; 59 }; 60}