2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitlike-commands,
|
|
|
|
paho-mqtt,
|
|
|
|
poetry-core,
|
|
|
|
pyaml,
|
|
|
|
pydantic,
|
|
|
|
pythonOlder,
|
|
|
|
thelogrus,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ha-mqtt-discoverable";
|
2024-10-23 06:41:50 +00:00
|
|
|
version = "0.16.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "unixorn";
|
|
|
|
repo = "ha-mqtt-discoverable";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-23 06:41:50 +00:00
|
|
|
hash = "sha256-IdyrcqRX5YXS6tx5qP7vOnAJpvy5sOsCwFpWMdyYaeI=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "pyaml" ];
|
|
|
|
|
|
|
|
build-system = [ poetry-core ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
gitlike-commands
|
|
|
|
paho-mqtt
|
|
|
|
pyaml
|
|
|
|
pydantic
|
|
|
|
thelogrus
|
|
|
|
];
|
|
|
|
|
|
|
|
# Test require a running Mosquitto instance
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "ha_mqtt_discoverable" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to create MQTT entities that are automatically discovered by Home Assistant";
|
|
|
|
homepage = "https://github.com/unixorn/ha-mqtt-discoverable";
|
|
|
|
changelog = "https://github.com/unixorn/ha-mqtt-discoverable/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|