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