Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / withings-api / default.nix
blob226907f9e95daf5a030d5b926474dfc25d55b84c
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
14 buildPythonPackage rec {
15   pname = "withings-api";
16   version = "2.4.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.6";
21   src = fetchFromGitHub {
22     owner = "vangorra";
23     repo = "python_withings_api";
24     rev = "refs/tags/${version}";
25     hash = "sha256-8cOLHYnodPGk1b1n6xbVyW2iju3cG6MgnzYTKDsP/nw=";
26   };
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   '';
34   nativeBuildInputs = [
35     poetry-core
36   ];
38   propagatedBuildInputs = [
39     arrow
40     requests-oauthlib
41     typing-extensions
42     pydantic
43   ];
45   nativeCheckInputs = [
46     pytestCheckHook
47     responses
48   ];
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     broken = versionAtLeast pydantic.version "2";
56   };