1{ lib 2, buildPythonPackage 3, fetchPypi 4, flit-core 5, httpx 6, pytest-asyncio 7, pytest-mock 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "zeversolarlocal"; 14 version = "1.1.0"; 15 format = "flit"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "ExZy5k5RE7k+D0lGmuIkGWrWQ+m24K2oqbUEg4BAVuY="; 22 }; 23 24 nativeBuildInputs = [ 25 flit-core 26 ]; 27 28 propagatedBuildInputs = [ 29 httpx 30 ]; 31 32 checkInputs = [ 33 pytest-asyncio 34 pytest-mock 35 pytestCheckHook 36 ]; 37 38 postPatch = '' 39 substituteInPlace pyproject.toml \ 40 --replace "--cov zeversolarlocal --cov-report xml:cov.xml --cov-report term-missing -vv" "" 41 ''; 42 43 disabledTests = [ 44 # Test requires network access 45 "test_httpx_timeout" 46 ]; 47 48 pythonImportsCheck = [ 49 "zeversolarlocal" 50 ]; 51 52 meta = with lib; { 53 description = "Python module to interact with Zeversolar inverters"; 54 homepage = "https://github.com/sander76/zeversolarlocal"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}