From 6c7edf43d16905a3871c0ba1d17b8d1748dfa8d6 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sun, 5 Jan 2025 12:19:49 +0000 Subject: [PATCH] Add ha-floorplan --- overlays/ha-floorplan.nix | 4 ++++ pkgs/ha-floorplan/package.nix | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 overlays/ha-floorplan.nix create mode 100644 pkgs/ha-floorplan/package.nix diff --git a/overlays/ha-floorplan.nix b/overlays/ha-floorplan.nix new file mode 100644 index 0000000..7717c5c --- /dev/null +++ b/overlays/ha-floorplan.nix @@ -0,0 +1,4 @@ +final: prev: +{ + home-assistant-custom-lovelace-modules.ha-floorplan = prev.callPackage ../pkgs/ha-floorplan/package.nix; +} diff --git a/pkgs/ha-floorplan/package.nix b/pkgs/ha-floorplan/package.nix new file mode 100644 index 0000000..dcd1b60 --- /dev/null +++ b/pkgs/ha-floorplan/package.nix @@ -0,0 +1,38 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "floorplan"; + version = "1.0.44"; + + src = fetchFromGitHub { + owner = "ExperienceLovelace"; + repo = "ha-floorplan"; + rev = "refs/tags/${version}"; + hash = "sha256-ajEA47H9nFXVcuvhwkDsxc5YYQWMsUXqHQ3t6tuAaxc="; + }; + + npmDepsHash = "sha256-/6H3XMraD7/usZBwmQaCDpV2n1Eed+U+G0f2YnjyWgk="; + + installPhase = '' + runHook preInstall + mkdir $out + cp -R dist/* $out/ + runHook postInstall + ''; + + meta = { + description = "Floorplan for Home Assistant"; + longDescription = '' + Bring new life to Home Assistant. By mapping entities to a SVG-object, + you're able to control devices, show states, calling services - and much + more. Add custom styling on top, to visualize whatever you can think of. + Your imagination just became the new limit. + ''; + homepage = "https://github.com/ExperienceLovelace/ha-floorplan"; + license = lib.licenses.asl20; + }; +}