1{ 2 lib, 3 aiohttp, 4 aresponses, 5 awesomeversion, 6 buildPythonPackage, 7 fetchFromGitHub, 8 pythonOlder, 9 pytest-asyncio, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "pyhaversion"; 15 version = "23.1.0"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "ludeeus"; 22 repo = pname; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-HMJqZn0yzN2dP5WTRCbem1Xw8nyH2Hy7oVP4kEKHHAo="; 25 }; 26 27 postPatch = '' 28 # Upstream doesn't set a version for the tagged releases 29 substituteInPlace setup.py \ 30 --replace "main" ${version} 31 ''; 32 33 propagatedBuildInputs = [ 34 aiohttp 35 awesomeversion 36 ]; 37 38 nativeCheckInputs = [ 39 aresponses 40 pytest-asyncio 41 pytestCheckHook 42 ]; 43 44 pythonImportsCheck = [ "pyhaversion" ]; 45 46 disabledTests = [ 47 # Error fetching version information from HaVersionSource.SUPERVISOR Server disconnected 48 "test_stable_version" 49 "test_etag" 50 ]; 51 52 meta = with lib; { 53 description = "Python module to the newest version number of Home Assistant"; 54 homepage = "https://github.com/ludeeus/pyhaversion"; 55 changelog = "https://github.com/ludeeus/pyhaversion/releases/tag/${version}"; 56 license = with licenses; [ mit ]; 57 maintainers = with maintainers; [ makefu ]; 58 }; 59}