1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "goodwe"; 10 version = "0.2.7"; 11 format = "pyproject"; 12 13 disabled = pythonOlder "3.8"; 14 15 src = fetchFromGitHub { 16 owner = "marcelblijleven"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "6/JAp7zK60+om4l14sLn+pUki0Q/5XwCJSawOf1q2q0="; 20 }; 21 22 checkInputs = [ 23 pytestCheckHook 24 ]; 25 26 postPatch = '' 27 substituteInPlace setup.cfg \ 28 --replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \ 29 --replace "version: file: VERSION" "version = ${version}" 30 ''; 31 32 pythonImportsCheck = [ 33 "goodwe" 34 ]; 35 36 meta = with lib; { 37 description = "Python library for connecting to GoodWe inverter"; 38 homepage = "https://github.com/marcelblijleven/goodwe"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ fab ]; 41 }; 42}