From 8656287a25076908ecf941d937cf0e56c86e66b3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 5 Jan 2024 19:38:05 +0100 Subject: [PATCH] home-assistant-custom-lovelace-modules.mushroom: init at 3.2.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🍄 Mushroom is a collection of cards for Home Assistant Dashboard UI. --- .../custom-lovelace-modules/default.nix | 2 ++ .../mushroom/default.nix | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/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 38bfeed576d4..49bdb62ad85e 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -8,5 +8,7 @@ mini-media-player = callPackage ./mini-media-player {}; + mushroom = callPackage ./mushroom { }; + zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; } diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix new file mode 100644 index 000000000000..2f114c595192 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "mushroom"; + version = "3.2.3"; + + src = fetchFromGitHub { + owner = "piitaya"; + repo = "lovelace-mushroom"; + rev = "v${version}"; + hash = "sha256-JGpMcIO8zTjcTqjKWxmVHnshIvBeCy/6UmMT+qTHla4="; + }; + + npmDepsHash = "sha256-0vSTpCG8AbDaiHW5d5nUgcrfPMt85JHX4KKoWTOgr4g="; + + installPhase = '' + runHook preInstall + + mkdir $out + install -m0644 dist/mushroom.js $out + + runHook postInstall + ''; + + meta = with lib; { + changelog = "https://github.com/piitaya/lovelace-mushroom/releases/tag/v${version}"; + description = "Mushroom Cards - Build a beautiful dashboard easily"; + homepage = "https://github.com/piitaya/lovelace-mushroom"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +}