2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-18 21:22:44 +00:00
|
|
|
, fetchFromGitHub
|
2021-03-09 03:18:52 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests_oauthlib
|
|
|
|
, simplejson
|
2021-07-18 21:22:44 +00:00
|
|
|
, pkce
|
|
|
|
, pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyvicare";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "2.16.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "somm15";
|
|
|
|
repo = "PyViCare";
|
|
|
|
rev = version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-fBqFvMb6/dg8PU2JYrXbOonXnS64d4ij81dRb30bVRc=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests_oauthlib
|
|
|
|
simplejson
|
2021-07-18 21:22:44 +00:00
|
|
|
pkce
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version_config=True," 'version="${version}",' \
|
|
|
|
--replace "'setuptools-git-versioning'" " "
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"PyViCare"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Library to access Viessmann ViCare API";
|
|
|
|
homepage = "https://github.com/somm15/PyViCare";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|