35 lines
968 B
Nix
35 lines
968 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 = src-meta.tag or src-meta.rev;
|
|
in
|
|
buildHomeAssistantComponent {
|
|
inherit (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 = [ ];
|
|
};
|
|
}
|