1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pkce 5, pytestCheckHook 6, pythonOlder 7, requests-oauthlib 8, simplejson 9}: 10 11buildPythonPackage rec { 12 pname = "pyvicare"; 13 version = "2.19.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "somm15"; 20 repo = "PyViCare"; 21 rev = version; 22 sha256 = "sha256-i1RXHrIkWqZw2LzVPEQSxgWa7PkUEsG6NO6H9egPWkk="; 23 }; 24 25 SETUPTOOLS_SCM_PRETEND_VERSION = version; 26 27 propagatedBuildInputs = [ 28 requests-oauthlib 29 simplejson 30 pkce 31 ]; 32 33 checkInputs = [ 34 pytestCheckHook 35 ]; 36 37 postPatch = '' 38 substituteInPlace setup.py \ 39 --replace "version_config=True," 'version="${version}",' \ 40 --replace "'setuptools-git-versioning<1.8.0'" "" 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}