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