home-assistant-minimalist: add required lovelace modules
This commit is contained in:
37
pkgs/lovelace-state-switch/package.nix
Normal file
37
pkgs/lovelace-state-switch/package.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
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
|
||||
'';
|
||||
|
||||
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 = [ ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user