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-06-05 15:53:02 +00:00
|
|
|
version = "0.14.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-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-vL4EzeU+8nUPyLR22MJtLhknWF4DWMo49EKvkIqIWhA=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|