about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix
new file mode 100644
index 000000000000..6e8eab20b359
--- /dev/null
+++ b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mushroom/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+}:
+
+buildNpmPackage rec {
+  pname = "mushroom";
+  version = "3.2.4";
+
+  src = fetchFromGitHub {
+    owner = "piitaya";
+    repo = "lovelace-mushroom";
+    rev = "v${version}";
+    hash = "sha256-UV/kqeVslB1lc1a9uvj8ocQKeAVINwo3aH8oHC9GLBQ=";
+  };
+
+  npmDepsHash = "sha256-p43ks6HM23LK3LOBOZA0uV+DTOj89/boBpjcXpbcw24=";
+
+  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 ];
+  };
+}