From 841dd2b1a0d81f0e53ceb732f160420bababf34e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 29 Aug 2024 19:55:42 +0200 Subject: [PATCH] home-assistant-custom-lovelace-modules.weather-card: init at 1.5.0 Signed-off-by: Matthias Beyer Co-authored-by: Arne Keller <2012gdwu+github@posteo.de> --- .../custom-lovelace-modules/default.nix | 2 ++ .../weather-card/default.nix | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/weather-card/default.nix diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 6271c3681bb1..bf372c75ec5b 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -37,6 +37,8 @@ valetudo-map-card = callPackage ./valetudo-map-card { }; + weather-card = callPackage ./weather-card { }; + zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; } // lib.optionalAttrs pkgs.config.allowAliases { diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/weather-card/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/weather-card/default.nix new file mode 100644 index 000000000000..63bc63e29a93 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/weather-card/default.nix @@ -0,0 +1,34 @@ +{ + lib, + stdenv, + fetchFromGitHub, +}: + +stdenv.mkDerivation rec { + pname = "weather-card"; + version = "1.5.0"; + + src = fetchFromGitHub { + owner = "bramkragten"; + repo = "weather-card"; + rev = "refs/tags/v${version}"; + hash = "sha256-pod5cayaHP+4vgdBgBRMQ7szkyz9HLaKVJWQX36XdTY="; + }; + dontBuild = true; + installPhase = '' + runHook preInstall + + mkdir $out + cp dist/weather-card.js $out/ + + runHook postInstall + ''; + + meta = { + description = "Weather Card with animated icons for Home Assistant Lovelace"; + homepage = "https://github.com/bramkragten/weather-card"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ matthiasbeyer ]; + platforms = lib.platforms.all; + }; +}