Files
nix-config/packages/homeassistant/ha-openhasp/default.nix
2026-04-05 19:10:23 -05:00

36 lines
1001 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.openhasp;
version = src-meta.tag or src-meta.rev;
in
buildHomeAssistantComponent {
inherit (src-meta) owner;
domain = "openhasp";
inherit version;
src = sources.openhasp;
# Use HA's own Python packages to satisfy the manifest check for jsonschema
nativeBuildInputs = [ home-assistant.python.pkgs.jsonschema ];
meta = {
changelog = "https://github.com/HASwitchPlate/openHASP-custom-component/releases/tag/${version}";
description = "This custom component simplifies synchronization of objects on one or more openHASP";
homepage = "https://github.com/HASwitchPlate/openHASP-custom-component";
maintainers = [ ];
};
}