{ lib, buildNpmPackage, fetchFromGitHub, }: buildNpmPackage rec { pname = "sankey-chart"; version = "3.6.0"; src = fetchFromGitHub { owner = "MindFreeze"; repo = "ha-sankey-chart"; rev = "v${version}"; hash = "sha256-Yjh9HrL7zcMFSlXLRW071zG4Wiyv9q2siIw5Ego4e80="; }; npmDepsHash = "sha256-rrzBw+zkvSf6+ABSGfC8rvtQ+pxYyZOPDW7TBpA0ysQ="; 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; }; }