2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
authlib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkce,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
simplejson,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyvicare";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.32.0";
|
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";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-qK5JCaCL+gbgNcBo5IjhlRrXD1IhA1B56hmcjvPie6Y=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version_config=True," 'version="${version}",' \
|
|
|
|
--replace "'setuptools-git-versioning<1.8.0'" ""
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
authlib
|
2021-07-18 21:22:44 +00:00
|
|
|
pkce
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-18 21:22:44 +00:00
|
|
|
pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
simplejson
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|