python3Packages.withings-api: init at 2.4.0
This commit is contained in:
parent
a941ed5513
commit
d40e8fe85c
2 changed files with 58 additions and 0 deletions
56
pkgs/development/python-modules/withings-api/default.nix
Normal file
56
pkgs/development/python-modules/withings-api/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, pythonOlder
|
||||||
|
, fetchFromGitHub
|
||||||
|
, poetry-core
|
||||||
|
, arrow
|
||||||
|
, requests-oauthlib
|
||||||
|
, typing-extensions
|
||||||
|
, pydantic
|
||||||
|
, responses
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "withings-api";
|
||||||
|
version = "2.4.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "vangorra";
|
||||||
|
repo = "python_withings_api";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
sha256 = "sha256-8cOLHYnodPGk1b1n6xbVyW2iju3cG6MgnzYTKDsP/nw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace 'requests-oauth = ">=0.4.1"' ''' \
|
||||||
|
--replace 'addopts = "--capture no --cov ./withings_api --cov-report html:build/coverage_report --cov-report term --cov-report xml:build/coverage.xml"' '''
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
arrow
|
||||||
|
requests-oauthlib
|
||||||
|
typing-extensions
|
||||||
|
pydantic
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
responses
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Library for the Withings Health API";
|
||||||
|
homepage = "https://github.com/vangorra/python_withings_api";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ kittywitch ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -11961,6 +11961,8 @@ in {
|
||||||
|
|
||||||
winsspi = callPackage ../development/python-modules/winsspi { };
|
winsspi = callPackage ../development/python-modules/winsspi { };
|
||||||
|
|
||||||
|
withings-api = callPackage ../development/python-modules/withings-api { };
|
||||||
|
|
||||||
wktutils = callPackage ../development/python-modules/wktutils { };
|
wktutils = callPackage ../development/python-modules/wktutils { };
|
||||||
|
|
||||||
wled = callPackage ../development/python-modules/wled { };
|
wled = callPackage ../development/python-modules/wled { };
|
||||||
|
|
Loading…
Reference in a new issue