2021-03-01 18:17:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-17 08:37:07 +01:00
|
|
|
, fetchFromGitHub
|
2021-03-01 18:17:54 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests_oauthlib
|
|
|
|
, simplejson
|
2021-07-17 08:37:07 +01:00
|
|
|
, pkce
|
|
|
|
, pytestCheckHook
|
2021-03-01 18:17:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyvicare";
|
2022-02-11 13:57:36 +00:00
|
|
|
version = "2.16.1";
|
2021-11-08 23:31:08 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-03-01 18:17:54 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-07-17 08:37:07 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "somm15";
|
|
|
|
repo = "PyViCare";
|
|
|
|
rev = version;
|
2022-02-11 13:57:36 +00:00
|
|
|
sha256 = "sha256-fBqFvMb6/dg8PU2JYrXbOonXnS64d4ij81dRb30bVRc=";
|
2021-03-01 18:17:54 +00:00
|
|
|
};
|
|
|
|
|
2021-07-17 08:37:07 +01:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-03-01 18:17:54 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests_oauthlib
|
|
|
|
simplejson
|
2021-07-17 08:37:07 +01:00
|
|
|
pkce
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-03-01 18:17:54 +00:00
|
|
|
];
|
|
|
|
|
2021-07-17 08:37:07 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version_config=True," 'version="${version}",' \
|
|
|
|
--replace "'setuptools-git-versioning'" " "
|
|
|
|
'';
|
|
|
|
|
2021-11-08 23:31:08 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"PyViCare"
|
|
|
|
];
|
2021-03-01 18:17:54 +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 ];
|
|
|
|
};
|
|
|
|
}
|