1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, httpx 5, protobuf 6, pytest-asyncio 7, pytest-httpx 8, pytest-mock 9, pytestCheckHook 10, pythonOlder 11, segno 12, setuptools-scm 13, syrupy 14, zeroconf 15}: 16 17buildPythonPackage rec { 18 pname = "devolo-plc-api"; 19 version = "1.4.1"; 20 format = "pyproject"; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "2Fake"; 26 repo = "devolo_plc_api"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-EP99AswHmLO+8ZQAPjJyw/P9QqfDawy3AqyJR870Qms="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace "protobuf>=4.22.0" "protobuf" 34 ''; 35 36 SETUPTOOLS_SCM_PRETEND_VERSION = version; 37 38 nativeBuildInputs = [ 39 setuptools-scm 40 ]; 41 42 propagatedBuildInputs = [ 43 httpx 44 protobuf 45 segno 46 zeroconf 47 ]; 48 49 __darwinAllowLocalNetworking = true; 50 51 nativeCheckInputs = [ 52 pytest-asyncio 53 pytest-httpx 54 pytest-mock 55 pytestCheckHook 56 syrupy 57 ]; 58 59 pythonImportsCheck = [ 60 "devolo_plc_api" 61 ]; 62 63 meta = with lib; { 64 description = "Module to interact with Devolo PLC devices"; 65 homepage = "https://github.com/2Fake/devolo_plc_api"; 66 changelog = "https://github.com/2Fake/devolo_plc_api/releases/tag/v${version}"; 67 license = licenses.gpl3Only; 68 maintainers = with maintainers; [ fab ]; 69 }; 70}