37 lines
896 B
Nix
37 lines
896 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.bambu_lab;
|
|
version = if src-meta ? tag then src-meta.tag else src-meta.rev;
|
|
in
|
|
buildHomeAssistantComponent {
|
|
owner = src-meta.owner;
|
|
domain = "bambu_lab";
|
|
inherit version;
|
|
|
|
src = sources.bambu_lab;
|
|
|
|
nativeBuildInputs = with home-assistant.python.pkgs; [
|
|
beautifulsoup4
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/greghesp/ha-bambulab/releases/tag/${version}";
|
|
description = "A Home Assistant Integration for Bambu Lab printers.";
|
|
homepage = "https://github.com/greghesp/ha-bambulab";
|
|
maintainers = [ ];
|
|
};
|
|
}
|