1{ lib 2, aiohttp 3, buildPythonPackage 4, fetchFromGitHub 5, iso4217 6, pytest-asyncio 7, pythonOlder 8, pytz 9}: 10 11buildPythonPackage rec { 12 pname = "pyefergy"; 13 version = "22.1.1"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "tkdrob"; 20 repo = pname; 21 rev = version; 22 hash = "sha256-AdoM+PcVoajxhnEfkyN9UuNufChu8XGmZDLNC3mjrps="; 23 }; 24 25 postPatch = '' 26 # setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'master' 27 substituteInPlace setup.py \ 28 --replace 'version="master",' 'version="${version}",' 29 ''; 30 31 propagatedBuildInputs = [ 32 aiohttp 33 iso4217 34 pytz 35 ]; 36 37 # Tests require network access 38 doCheck =false; 39 40 pythonImportsCheck = [ 41 "pyefergy" 42 ]; 43 44 meta = with lib; { 45 description = "Python API library for Efergy energy meters"; 46 homepage = "https://github.com/tkdrob/pyefergy"; 47 license = with licenses; [ mit ]; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}