From cde4148e078fe51b6f84bbbf76609b815b54af7d Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Thu, 12 Sep 2024 14:50:51 +0300 Subject: [PATCH] home-assistant-custom-components.bodymiscale: init at 2024.6.0 --- .../custom-components/bodymiscale/default.nix | 35 +++++++++++++++++++ .../custom-components/default.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-components/bodymiscale/default.nix diff --git a/pkgs/servers/home-assistant/custom-components/bodymiscale/default.nix b/pkgs/servers/home-assistant/custom-components/bodymiscale/default.nix new file mode 100644 index 000000000000..e2b23891db94 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-components/bodymiscale/default.nix @@ -0,0 +1,35 @@ +{ + lib, + buildHomeAssistantComponent, + fetchFromGitHub, + + cachetools, +}: + +buildHomeAssistantComponent rec { + owner = "dckiller51"; + domain = "bodymiscale"; + version = "2024.6.0"; + + src = fetchFromGitHub { + inherit owner; + repo = domain; + rev = version; + hash = "sha256-6bYKqU9yucISjTrmCUx1bNn9kqvT9jW1OBrqAa4ayEQ="; + }; + + postPatch = '' + substituteInPlace custom_components/bodymiscale/manifest.json --replace-fail 'cachetools==5.3.0' 'cachetools>=5.3.0' + ''; + + propagatedBuildInputs = [ + cachetools + ]; + + meta = { + description = "Home Assistant custom component providing body metrics for Xiaomi Mi Scale 1 and 2"; + homepage = "https://github.com/dckiller51/bodymiscale"; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ justinas ]; + }; +} diff --git a/pkgs/servers/home-assistant/custom-components/default.nix b/pkgs/servers/home-assistant/custom-components/default.nix index bd819ad0c36b..1f82c9d3db1f 100644 --- a/pkgs/servers/home-assistant/custom-components/default.nix +++ b/pkgs/servers/home-assistant/custom-components/default.nix @@ -12,6 +12,8 @@ better_thermostat = callPackage ./better_thermostat {}; + bodymiscale = callPackage ./bodymiscale { }; + dwd = callPackage ./dwd { }; elevenlabs_tts = callPackage ./elevenlabs_tts {};