From 6fd7f5ed485b5a92f00dd0cbfdca07841b552014 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 22 Oct 2024 20:28:11 -0400 Subject: [PATCH] feat(hass): update material-symbols --- .../homie/modules/home-assistant/frontend.nix | 8 +++++++- flake.lock | Bin 57166 -> 57166 bytes legacyPackages/hass-components/default.nix | 1 + .../material-symbols/default.nix | 15 +++++++++++++++ .../lovelace-components/default.nix | 1 - .../material-symbols/default.nix | 15 --------------- 6 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 legacyPackages/hass-components/material-symbols/default.nix delete mode 100644 legacyPackages/lovelace-components/material-symbols/default.nix diff --git a/devices/homie/modules/home-assistant/frontend.nix b/devices/homie/modules/home-assistant/frontend.nix index 0b428802..2b9a93f8 100644 --- a/devices/homie/modules/home-assistant/frontend.nix +++ b/devices/homie/modules/home-assistant/frontend.nix @@ -79,6 +79,13 @@ in { }; }; + customComponents = builtins.attrValues { + inherit + (self.legacyPackages.${pkgs.system}.hass-components) + material-symbols + ; + }; + customLovelaceModules = builtins.attrValues { inherit (pkgs.home-assistant-custom-lovelace-modules) @@ -87,7 +94,6 @@ in { inherit (self.legacyPackages.${pkgs.system}.lovelace-components) - material-symbols custom-sidebar ; }; diff --git a/flake.lock b/flake.lock index 7e941c05450c41032818ffb30bece9cb1bb6a29a..98689a69a8e5f93b7ba2e57a33821c4ab15e60e5 100644 GIT binary patch delta 127 zcmV-_0D%9_z5~v_1F+U%2r@Y~Gc-3fF_ZBh9V>KaLSbkzXirIHS!jAWZ)q=PYe#Ep zM{ZG9F?mHnaAQ_iLT^S)L~}=YQIi1~7?bc~Hj`dT2PZKyV=`ekHexq7H#Ih9Ghs6` hVPiKoGh#P1V=yo|WMX1wI599~F_WPaOtbD{V0;HwD%Jo1 delta 126 zcmV-^0D=F`z5~v_1F+U%2Qf7M-BVKHPjVq`NgWH4f3VKiko gH)dgBI5asmFkxmfHZ?LZWoBYylTipuv+iPGeDFIfSO5S3 diff --git a/legacyPackages/hass-components/default.nix b/legacyPackages/hass-components/default.nix index a00307ca..0534f425 100644 --- a/legacyPackages/hass-components/default.nix +++ b/legacyPackages/hass-components/default.nix @@ -9,6 +9,7 @@ lib.makeScope pkgs.newScope (hass: let in { extended-ollama-conversation = buildHassComponent ./extended-ollama-conversation {}; ha-fallback-conversation = buildHassComponent ./ha-fallback-conversation {}; + material-symbols = buildHassComponent ./material-symbols {}; netdaemon = buildHassComponent ./netdaemon {}; spotifyplus = import ./spotifyplus ({inherit buildHassComponent;} // inputs); tuya-local = buildHassComponent ./tuya-local {}; diff --git a/legacyPackages/hass-components/material-symbols/default.nix b/legacyPackages/hass-components/material-symbols/default.nix new file mode 100644 index 00000000..907b5532 --- /dev/null +++ b/legacyPackages/hass-components/material-symbols/default.nix @@ -0,0 +1,15 @@ +{ + material-symbols-src, + buildHomeAssistantComponent, + ... +}: let + inherit (builtins) fromJSON readFile; + + manifest = fromJSON (readFile "${material-symbols-src}/custom_components/material_symbols/manifest.json"); +in + buildHomeAssistantComponent { + owner = "beecho01"; + + inherit (manifest) domain version; + src = material-symbols-src; + } diff --git a/legacyPackages/lovelace-components/default.nix b/legacyPackages/lovelace-components/default.nix index a99e2541..ca60ed98 100644 --- a/legacyPackages/lovelace-components/default.nix +++ b/legacyPackages/lovelace-components/default.nix @@ -7,5 +7,4 @@ lib.makeScope pkgs.newScope (lovelace: let callPackage = file: lovelace.callPackage file ({} // inputs); in { custom-sidebar = callPackage ./custom-sidebar; - material-symbols = callPackage ./material-symbols; }) diff --git a/legacyPackages/lovelace-components/material-symbols/default.nix b/legacyPackages/lovelace-components/material-symbols/default.nix deleted file mode 100644 index 0f769c2a..00000000 --- a/legacyPackages/lovelace-components/material-symbols/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - material-symbols-src, - stdenv, - ... -}: -stdenv.mkDerivation { - pname = "material-symbols"; - version = "0.0.0+${material-symbols-src.shortRev}"; - src = material-symbols-src; - phases = ["installPhase"]; - installPhase = '' - mkdir $out - cp $src/dist/material-symbols.js $out - ''; -}