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