diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 6271c3681bb1d..80c92cded6b31 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -31,6 +31,8 @@ rmv-card = callPackage ./rmv-card { }; + sankey-chart = callPackage ./sankey-chart { }; + template-entity-row = callPackage ./template-entity-row { }; universal-remote-card = callPackage ./universal-remote-card { }; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/sankey-chart/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/sankey-chart/default.nix new file mode 100644 index 0000000000000..d9b1c25b1cc5f --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/sankey-chart/default.nix @@ -0,0 +1,37 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "sankey-chart"; + version = "3.5.0"; + + src = fetchFromGitHub { + owner = "MindFreeze"; + repo = "ha-sankey-chart"; + rev = "v${version}"; + hash = "sha256-cQZPWyXMwJZAhsWYtNLGXpelvmeWlyQbaoqYREwfeNg="; + }; + + npmDepsHash = "sha256-GXhxMq0h/AmLGIiq2N/hSi+4O9uNDPawaSdPmJ8OyX8="; + + installPhase = '' + runHook preInstall + + mkdir $out/ + cp -v dist/ha-sankey-chart.js $out/sankey-chart.js + + runHook postInstall + ''; + + meta = { + description = "Home Assistant lovelace card to display a sankey chart."; + homepage = "https://github.com/MindFreeze/ha-sankey-chart"; + changelog = "https://github.com/MindFreeze/ha-sankey-chart/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hexa ]; + platforms = lib.platforms.all; + }; +}