40 lines
814 B
Nix

{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "lovelace-state-switch";
version = "1.9.5";
src = fetchFromGitHub {
owner = "thomasloven";
repo = "lovelace-state-switch";
rev = version;
hash = "sha256-jrybRchpZWmqauKKv4i4ht/CAdMNykOuPjlDnZh4KPw=";
};
npmDepsHash = "sha256-p+XPG6nB9wDmaWrmSc0dmJdKBdIivbM337Gf4j6xqBg=";
installPhase = ''
runHook preInstall
mkdir $out
install -m0644 state-switch.js $out
runHook postInstall
'';
passthru.entrypoint = "state-switch.js";
makeCacheWritable = true;
meta = with lib; {
description = "Dynamically replace lovelace cards depending on occasion";
homepage = "https://github.com/thomasloven/lovelace-state-switch";
license = licenses.mit;
maintainers = [ ];
};
}