1{
2 lib,
3 authlib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pkce,
7 pytestCheckHook,
8 pythonOlder,
9 simplejson,
10}:
11
12buildPythonPackage rec {
13 pname = "pyvicare";
14 version = "2.32.0";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "somm15";
21 repo = "PyViCare";
22 rev = "refs/tags/${version}";
23 hash = "sha256-qK5JCaCL+gbgNcBo5IjhlRrXD1IhA1B56hmcjvPie6Y=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace "version_config=True," 'version="${version}",' \
29 --replace "'setuptools-git-versioning<1.8.0'" ""
30 '';
31
32 propagatedBuildInputs = [
33 authlib
34 pkce
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 simplejson
40 ];
41
42 pythonImportsCheck = [ "PyViCare" ];
43
44 meta = with lib; {
45 description = "Python Library to access Viessmann ViCare API";
46 homepage = "https://github.com/somm15/PyViCare";
47 license = with licenses; [ asl20 ];
48 maintainers = with maintainers; [ fab ];
49 };
50}