Files
nix-config/packages/homeassistant/ha-wyzeapi/default.nix
mjallen18 bd799661b9 fix avahi
2026-03-31 13:33:42 -05:00

35 lines
991 B
Nix

{
lib,
namespace,
pkgs,
buildHomeAssistantComponent,
...
}:
let
inherit (lib.trivial) importJSON;
inherit (lib.${namespace}) selectVariant mkAllSources;
versionSpec = importJSON ./version.json;
selected = selectVariant versionSpec null null;
sources = mkAllSources pkgs selected;
src-meta = selected.sources.wyzeapi;
version = if src-meta ? tag then src-meta.tag else src-meta.rev;
in
buildHomeAssistantComponent {
owner = src-meta.owner;
domain = "wyzeapi";
inherit version;
src = sources.wyzeapi;
# wyzeapy must be built against HA's Python; pkgs.mjallen.wyzeapy uses home-assistant.python
dependencies = [ pkgs.${namespace}.wyzeapy ];
meta = {
changelog = "https://github.com/SecKatie/ha-wyzeapi/releases/tag/${version}";
description = "This is a custom component to allow control of various Wyze devices in Home Assistant using the unofficial API.";
homepage = "https://github.com/SecKatie/ha-wyzeapi";
maintainers = [ ];
};
}