37 lines
913 B
Nix
37 lines
913 B
Nix
{
|
|
lib,
|
|
namespace,
|
|
pkgs,
|
|
buildHomeAssistantComponent,
|
|
home-assistant,
|
|
...
|
|
}:
|
|
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.govee;
|
|
version = src-meta.tag or src-meta.rev;
|
|
in
|
|
buildHomeAssistantComponent {
|
|
inherit (src-meta) owner;
|
|
inherit version;
|
|
domain = "govee";
|
|
|
|
src = sources.govee;
|
|
|
|
nativeBuildInputs = with home-assistant.python.pkgs; [
|
|
dacite
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/${src-meta.owner}/hacs-govee/releases/tag/${version}";
|
|
description = "The Govee integration allows you to control and monitor lights and switches using the Govee API.";
|
|
homepage = "https://github.com/${src-meta.owner}/hacs-govee";
|
|
maintainers = [ ];
|
|
};
|
|
}
|