at 24.11-pre 59 lines 1.3 kB view raw
1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 poetry-core, 8 pytest-asyncio, 9 pytestCheckHook, 10 pythonOlder, 11 yarl, 12}: 13 14buildPythonPackage rec { 15 pname = "omnikinverter"; 16 version = "1.0.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.11"; 20 21 src = fetchFromGitHub { 22 owner = "klaasnicolaas"; 23 repo = "python-omnikinverter"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-W9VeRhsCXLLgOgvJcNNCGNmPvakPtKHAtwQAGtYJbcY="; 26 }; 27 28 __darwinAllowLocalNetworking = true; 29 30 postPatch = '' 31 # Upstream doesn't set a version for the pyproject.toml 32 substituteInPlace pyproject.toml \ 33 --replace "0.0.0" "${version}" \ 34 --replace "--cov" "" 35 ''; 36 37 nativeBuildInputs = [ poetry-core ]; 38 39 propagatedBuildInputs = [ 40 aiohttp 41 yarl 42 ]; 43 44 nativeCheckInputs = [ 45 aresponses 46 pytest-asyncio 47 pytestCheckHook 48 ]; 49 50 pythonImportsCheck = [ "omnikinverter" ]; 51 52 meta = with lib; { 53 description = "Python module for the Omnik Inverter"; 54 homepage = "https://github.com/klaasnicolaas/python-omnikinverter"; 55 changelog = "https://github.com/klaasnicolaas/python-omnikinverter/releases/tag/v${version}"; 56 license = with licenses; [ mit ]; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}