1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 gitlike-commands, 6 paho-mqtt, 7 poetry-core, 8 pyaml, 9 pydantic, 10 pythonOlder, 11}: 12 13buildPythonPackage rec { 14 pname = "ha-mqtt-discoverable"; 15 version = "0.20.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.10"; 19 20 src = fetchFromGitHub { 21 owner = "unixorn"; 22 repo = "ha-mqtt-discoverable"; 23 tag = "v${version}"; 24 hash = "sha256-XaaL5O6WHIs+9vNq/IqolPUsL04l6PCKTZNBTYH1z4g="; 25 }; 26 27 pythonRelaxDeps = [ 28 "paho-mqtt" 29 "pyaml" 30 "pydantic" 31 ]; 32 33 build-system = [ poetry-core ]; 34 35 dependencies = [ 36 gitlike-commands 37 paho-mqtt 38 pyaml 39 pydantic 40 ]; 41 42 # Test require a running Mosquitto instance 43 doCheck = false; 44 45 pythonImportsCheck = [ "ha_mqtt_discoverable" ]; 46 47 meta = with lib; { 48 description = "Python module to create MQTT entities that are automatically discovered by Home Assistant"; 49 homepage = "https://github.com/unixorn/ha-mqtt-discoverable"; 50 changelog = "https://github.com/unixorn/ha-mqtt-discoverable/releases/tag/${src.tag}"; 51 license = licenses.asl20; 52 maintainers = with maintainers; [ fab ]; 53 }; 54}